note 74888 added to function.trim

From: Date: Wed, 02 May 2007 14:40:01 +0000
Subject: note 74888 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-126119@lists.php.net to get a copy of this message
An very effective method for trimming a string from a string: <?php function lStringTrim($string, $trim){ return preg_replace("/^((".$trim.")+)/","",$string); } function rStringTrim($string, $trim){ return preg_replace("/((".$trim.")+)$/","",$string); } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 217.156.83.1 ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit -- https://master.php.net/note/edit/74888 Del: integrated -- https://master.php.net/note/delete/74888/integrated Del: useless -- https://master.php.net/note/delete/74888/useless Del: bad code -- https://master.php.net/note/delete/74888/bad+code Del: spam -- https://master.php.net/note/delete/74888/spam Del: non-english -- https://master.php.net/note/delete/74888/non-english Del: in docs -- https://master.php.net/note/delete/74888/in+docs Del: other reasons-- https://master.php.net/note/delete/74888 Reject -- https://master.php.net/note/reject/74888 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126119) next »