mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added example to reflect #21318, and minor changes.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@134203 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
25f7ca22c8
commit
d72284c6df
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.26 -->
|
||||
<refentry id="function.str-pad">
|
||||
<refnamediv>
|
||||
|
@ -46,6 +46,7 @@ $input = "Alien";
|
|||
print str_pad($input, 10); // produces "Alien "
|
||||
print str_pad($input, 10, "-=", STR_PAD_LEFT); // produces "-=-=-Alien"
|
||||
print str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___"
|
||||
print str_pad($input, 6 , "___"); // produces "Alien_"
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -54,8 +55,8 @@ print str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___"
|
|||
<note>
|
||||
<para>
|
||||
The <parameter>pad_string</parameter> may be truncated if the
|
||||
required number of padding characters can't be evenly diveded by
|
||||
the padding strings length.
|
||||
required number of padding characters can't be evenly divided by
|
||||
the <parameter>pad_string</parameter>'s length.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
|
Loading…
Reference in a new issue