note 68646 added to function.mb-strpos

From: Date: Fri, 04 Aug 2006 16:42:21 +0000
Subject: note 68646 added to function.mb-strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-115555@lists.php.net to get a copy of this message
a sample mb_str_replace function: function mb_str_replace($haystack, $search,$replace, $offset=0,$encoding='auto'){ $len_sch=mb_strlen($search,$encoding); $len_rep=mb_strlen($replace,$encoding); while (($offset=mb_strpos($haystack,$search,$offset,$encoding))!==false){ $haystack=mb_substr($haystack,0,$offset,$encoding) .$replace .mb_substr($haystack,$offset+$len_sch,1000,$encoding); $offset=$offset+$len_rep; if ($offset>mb_strlen($haystack,$encoding))break; } return $haystack; } ---- Server IP: 203.202.10.60 Probable Submitter: 86.137.112.171 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.mb-strpos.php Edit -- https://master.php.net/note/edit/68646 Del: integrated -- https://master.php.net/note/delete/68646/integrated Del: useless -- https://master.php.net/note/delete/68646/useless Del: bad code -- https://master.php.net/note/delete/68646/bad+code Del: spam -- https://master.php.net/note/delete/68646/spam Del: non-english -- https://master.php.net/note/delete/68646/non-english Del: in docs -- https://master.php.net/note/delete/68646/in+docs Del: other reasons-- https://master.php.net/note/delete/68646 Reject -- https://master.php.net/note/reject/68646 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115555) next »