From 413b9f0979010d9aaf716f703ebaf53df08743c8 Mon Sep 17 00:00:00 2001 From: Dave Barr Date: Sat, 7 Aug 2004 17:54:17 +0000 Subject: [PATCH] - Add an alternate padding character example. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@165666 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/sprintf.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/strings/functions/sprintf.xml b/reference/strings/functions/sprintf.xml index 395c063a19..890c436fff 100644 --- a/reference/strings/functions/sprintf.xml +++ b/reference/strings/functions/sprintf.xml @@ -1,5 +1,5 @@ - + @@ -245,6 +245,7 @@ printf("[%s]\n", $s); // standard string output printf("[%10s]\n", $s); // right-justification with spaces printf("[%-10s]\n", $s); // left-justification with spaces printf("[%010s]\n", $s); // zero-padding works on strings too +printf("[%'#10s]\n", $s); // use the custom padding character '#' printf("[%10.10s]\n", $t); // left-justification but with a cutoff of 10 characters ?> ]]> @@ -258,6 +259,7 @@ printf("[%10.10s]\n", $t); // left-justification but with a cutoff of 10 charact [ monkey] [monkey ] [0000monkey] +[####monkey] [many monke] ]]>