[dovecot-cvs] dovecot/doc variables.txt,1.12,1.13

tss at dovecot.org tss at dovecot.org
Sun Nov 12 12:06:37 UTC 2006


Update of /var/lib/cvs/dovecot/doc
In directory talvi:/tmp/cvs-serv13761/doc

Modified Files:
	variables.txt 
Log Message:
Fixed zero padding handling and documented it. %0.1n shouldn't enable it,
and it really shouldn't stay for the next %variable. -sign also shouldn't
stay for the next variable.



Index: variables.txt
===================================================================
RCS file: /var/lib/cvs/dovecot/doc/variables.txt,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- variables.txt	17 Oct 2006 11:06:16 -0000	1.12
+++ variables.txt	12 Nov 2006 12:06:33 -0000	1.13
@@ -35,12 +35,18 @@
 
 You can take a substring of the variable by giving optional offset followed
 by '.' and width after the '%' character. For example %2u gives first two
-characters of the username. %2.1u gives third character of the username. If
-the offset is negative, it counts from the end, for example %-2.02i gives
+characters of the username. %2.1u gives third character of the username.
+
+If the offset is negative, it counts from the end, for example %-2.2i gives
 the UID mod 100 (last two characters of the UID printed in a string). If a
 positive offset points outside the value, empty string is returned, if a
 negative offset does then the string is taken from the start.
 
+If the width is prefixed with zero, the string isn't truncated, but only
+padded with '0' character if the string is shorter. For example %04i may
+return "0001", "1000" and "12345". %1.04i for the same string would return
+"001", "000" and "2345".
+
 For login_log_format_elements there are also these variables:
 
  %m - authentication method (eg. PLAIN)



More information about the dovecot-cvs mailing list