[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/strings/functions/_str-pad.xml?=
From: Christoph_Michael_Becker <cmb () php ! net>
Date: 2015-08-31 21:00:41
Message-ID: svn-cmb-1441054841-337681-248510787 () svn ! php ! net
[Download RAW message or body]
cmb Mon, 31 Aug 2015 21:00:41 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337681
Log:
str_pad() never trims input string
Changed paths:
U phpdoc/en/trunk/reference/strings/functions/str-pad.xml
Modified: phpdoc/en/trunk/reference/strings/functions/str-pad.xml
===================================================================
--- phpdoc/en/trunk/reference/strings/functions/str-pad.xml 2015-08-31 19:46:08 UTC (rev 337680)
+++ phpdoc/en/trunk/reference/strings/functions/str-pad.xml 2015-08-31 21:00:41 UTC (rev 337681)
@@ -44,7 +44,7 @@
<para>
If the value of <parameter>pad_length</parameter> is negative,
less than, or equal to the length of the input string, no padding
- takes place.
+ takes place, and <parameter>input</parameter> will be returned.
</para>
</listitem>
</varlistentry>
@@ -96,7 +96,8 @@
echo str_pad($input, 10); // produces "Alien "
echo str_pad($input, 10, "-=", STR_PAD_LEFT); // produces "-=-=-Alien"
echo str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___"
-echo str_pad($input, 6 , "___"); // produces "Alien_"
+echo str_pad($input, 6, "___"); // produces "Alien_"
+echo str_pad($input, 3, "*"); // produces "Alien"
?>
]]>
</programlisting>
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic