mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Add an alternate padding character example.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@165666 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c43b87be6a
commit
413b9f0979
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.sprintf">
|
||||
<refnamediv>
|
||||
|
@ -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]
|
||||
]]>
|
||||
</screen>
|
||||
|
|
Loading…
Reference in a new issue