Source for file str_ireplace.php
Documentation is available at str_ireplace.php
* @version $Id: str_ireplace.php,v 1.1 2007/09/09 20:39:49 pitlinz Exp $
//---------------------------------------------------------------
* UTF-8 aware alternative to str_ireplace
* Case-insensitive version of str_replace
* Note: requires utf8_strtolower
* Note: it's not fast and gets slower if $search / $replace is array
* Notes: it's based on the assumption that the lower and uppercase
* versions of a UTF-8 character will have the same length in bytes
* which is currently true given the hash table to strtolower
* @see http://www.php.net/str_ireplace
while ( preg_match('/(.*)'.
$search.
'/Us',$lstr, $matches) ) {
$matched +=
$mlen +
$lendif;
Documentation generated on Thu, 08 Jan 2009 17:48:36 +0100 by phpDocumentor 1.4.0a2