note 20366 deleted from function.rtrim by danbrown
| From: | danbrown@php.net | Date: | Sun, 14 Dec 2008 17:22:41 +0000 |
| Subject: | note 20366 deleted from function.rtrim by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148154@lists.php.net to get a copy of this message | ||
Note Submitter: icon-phpnet at phy dot duke dot edu
----
Not entirely. Perl's "chomp" will only remove the newline character, while rtrim
without the second parameter will remove ALL whitespace. E.g. chomp("blah \n") will return
"blah ", while rtrim("blah \n") will return "blah".