note 32756 added to function.trim

From: Date: Thu, 05 Jun 2003 23:32:57 +0000
Subject: note 32756 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-49824@lists.php.net to get a copy of this message
You can combine character ranges and individual characters in trim()'s second argument (ditto for ltrim and rtrim). All of the specified characters and ranges will be used concurrently (i.e., if a character on either end of the string matches any of the specified charaters or character ranges, it will be trimmed). The characters and character ranges can be in any order (except of course that the character ranges need to be specified in increasing order) and may overlap. E.g., trim any nongraphical non-ASCII character: trim($text,"\x7f..\xff\x0..\x1f"); ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32756 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32756&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32756&report=yes

« previous php.notes (#49824) next »