note 32755 added to function.rtrim
| From: | HW at rack1 dot php dot net | Date: | Thu, 05 Jun 2003 23:32:49 +0000 |
| Subject: | note 32755 added to function.rtrim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49823@lists.php.net to get a copy of this message | ||
$text = "This string contains some unwanted characters on the end.";
$text1 = rtrim($text, 'a..z');
$text1 = rtrim($text1, '.');
echo $text1; // only the '.' is trimmed.
$text2 = rtrim($text, 'a..z.');
echo $text2; // The whole last word is trimmed.
----
Manual Page -- http://www.php.net/manual/en/function.rtrim.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32755
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32755&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32755&report=yes