__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @package utf8
*/
//---------------------------------------------------------------
/**
* 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
* @param string
* @return string
* @see http://www.php.net/str_ireplace
* @see utf8_strtolower
* @package utf8
*/
function utf8_ireplace($search, $replace, $str, $count = NULL){
if ( !is_array($search) ) {
$slen = strlen($search);
if ( $slen == 0 ) {
return $str;
}
$lendif = strlen($replace) - strlen($search);
$search = utf8_strtolower($search);
$search = preg_quote($search, '/');
$lstr = utf8_strtolower($str);
$i = 0;
$matched = 0;
while ( preg_match('/(.*)'.$search.'/Us',$lstr, $matches) ) {
if ( $i === $count ) {
break;
}
$mlen = strlen($matches[0]);
$lstr = substr($lstr, $mlen);
$str = substr_replace($str, $replace, $matched+strlen($matches[1]), $slen);
$matched += $mlen + $lendif;
$i++;
}
return $str;
} else {
foreach ( array_keys($search) as $k ) {
if ( is_array($replace) ) {
if ( array_key_exists($k,$replace) ) {
$str = utf8_ireplace($search[$k], $replace[$k], $str, $count);
} else {
$str = utf8_ireplace($search[$k], '', $str, $count);
}
} else {
$str = utf8_ireplace($search[$k], $replace, $str, $count);
}
}
return $str;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| mbstring | Folder | 0775 |
|
|
| native | Folder | 0775 |
|
|
| utils | Folder | 0775 |
|
|
| LICENSE | File | 25.81 KB | 0664 |
|
| README | File | 3.21 KB | 0664 |
|
| ord.php | File | 2.57 KB | 0664 |
|
| str_ireplace.php | File | 1.89 KB | 0664 |
|
| str_pad.php | File | 1.62 KB | 0664 |
|
| str_split.php | File | 764 B | 0664 |
|
| strcasecmp.php | File | 486 B | 0664 |
|
| strcspn.php | File | 834 B | 0664 |
|
| stristr.php | File | 795 B | 0664 |
|
| strrev.php | File | 398 B | 0664 |
|
| strspn.php | File | 863 B | 0664 |
|
| substr_replace.php | File | 562 B | 0664 |
|
| trim.php | File | 2.08 KB | 0664 |
|
| ucfirst.php | File | 727 B | 0664 |
|
| ucwords.php | File | 1.36 KB | 0664 |
|
| utf8.php | File | 2.68 KB | 0664 |
|