note 90905 added to function.trim
| From: | Andrew at osu1 dot php dot net | Date: | Fri, 15 May 2009 16:01:44 +0000 |
| Subject: | note 90905 added to function.trim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154640@lists.php.net to get a copy of this message | ||
It should be mentioned that if you use the second charlist parameter, you are overriding the
defaults, not adding to them. You would need to either explicitly add them to the charlist or call
trim twice, like so:
<?php
$str = trim(trim($str), './@#$');
?>
----
Server IP: 69.147.83.197
Probable Submitter: 71.255.68.177
----
Manual Page -- http://www.php.net/manual/en/function.trim.php
Edit -- https://master.php.net/note/edit/90905
Del: integrated -- https://master.php.net/note/delete/90905/integrated
Del: useless -- https://master.php.net/note/delete/90905/useless
Del: bad code -- https://master.php.net/note/delete/90905/bad+code
Del: spam -- https://master.php.net/note/delete/90905/spam
Del: non-english -- https://master.php.net/note/delete/90905/non-english
Del: in docs -- https://master.php.net/note/delete/90905/in+docs
Del: other reasons-- https://master.php.net/note/delete/90905
Reject -- https://master.php.net/note/reject/90905
Search -- https://master.php.net/manage/user-notes.php