note 105136 added to function.str-pad
| From: | ChrisAbbey at osu1 dot php dot net | Date: | Fri, 29 Jul 2011 16:30:01 +0000 |
| Subject: | note 105136 added to function.str-pad | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181997@lists.php.net to get a copy of this message | ||
Kari "Haprog" Sderholm's mb_str_pad() suggestion below has a minor flaw: str_pad can
(and blindly will) truncate in the middle of a multi byte sequence. I've tried to play with
various was to pre-trim the string, but nothing is working to work around the mb string unsafeness
of str_pad.
----
Server IP: 69.147.83.197
Probable Submitter: 96.42.225.84
----
Manual Page -- http://www.php.net/manual/en/function.str-pad.php
Edit -- https://master.php.net/note/edit/105136
Del: integrated -- https://master.php.net/note/delete/105136/integrated
Del: useless -- https://master.php.net/note/delete/105136/useless
Del: bad code -- https://master.php.net/note/delete/105136/bad+code
Del: spam -- https://master.php.net/note/delete/105136/spam
Del: non-english -- https://master.php.net/note/delete/105136/non-english
Del: in docs -- https://master.php.net/note/delete/105136/in+docs
Del: other reasons-- https://master.php.net/note/delete/105136
Reject -- https://master.php.net/note/reject/105136
Search -- https://master.php.net/manage/user-notes.php