note 55659 added to function.mb-ereg-replace

From: Date: Tue, 09 Aug 2005 22:52:41 +0000
Subject: note 55659 added to function.mb-ereg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-93342@lists.php.net to get a copy of this message
A simple mb_str_ireplace() implementation - a faster (?) replacement for non-regexp multi-byte string replacement: [code] function mb_str_ireplace($co, $naCo, $wCzym) { $wCzymM = mb_strtolower($wCzym); $coM = mb_strtolower($co); $offset = 0; while(($poz = mb_strpos($wCzymM, $coM, $offset)) !== false) { $offset = $poz + mb_strlen($naCo); $wCzym = mb_substr($wCzym, 0, $poz). $naCo .mb_substr($wCzym, $poz+mb_strlen($co)); $wCzymM = mb_strtolower($wCzym); } return $wCzym; }[/code] ---- Manual Page -- http://www.php.net/manual/en/function.mb-ereg-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55659 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55659&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55659&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55659&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55659&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55659&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55659&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55659&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93342) next »