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:
Philip Olson 2003-07-04 23:13:02 +00:00
parent 25f7ca22c8
commit d72284c6df

View file

@ -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>