note 76226 added to function.trim

From: Date: Fri, 06 Jul 2007 07:48:33 +0000
Subject: note 76226 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-128259@lists.php.net to get a copy of this message
Responding to Robin Leffmann: jayoungh5 wrote a function to trim whitespace on the left, on the right, in the middle, everywhere (Below). It iterates through the string's characters. Yours, claimed to be faster, uses a regex function. I think it should be slower since I believe that dealing with a regex is iterative in nature and add to that the possibility of recursion! Perhaps your function is shorter in code lines. I am not absolutely positive, so take this as a clue but research for a more solid truth. ---- Server IP: 64.71.164.2 Probable Submitter: 196.205.204.150 ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit -- https://master.php.net/note/edit/76226 Del: integrated -- https://master.php.net/note/delete/76226/integrated Del: useless -- https://master.php.net/note/delete/76226/useless Del: bad code -- https://master.php.net/note/delete/76226/bad+code Del: spam -- https://master.php.net/note/delete/76226/spam Del: non-english -- https://master.php.net/note/delete/76226/non-english Del: in docs -- https://master.php.net/note/delete/76226/in+docs Del: other reasons-- https://master.php.net/note/delete/76226 Reject -- https://master.php.net/note/reject/76226 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128259) next »