note 93621 deleted from function.mb-strtolower by danbrown
| From: | danbrown@php.net | Date: | Fri, 18 Sep 2009 19:11:34 +0000 |
| Subject: | note 93621 deleted from function.mb-strtolower by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160841@lists.php.net to get a copy of this message | ||
Note Submitter: vitall at ua dot fm
----
function utf_lower($s,$c='WINDOWS-1251')
{
$u='UTF-8';
if(function_exists('mb_strtolower')) return mb_strtolower($s,$u);
if(preg_match('/^[\x00-\x7e]*$/',$s)) return strtolower($s);
return iconv($c,$u,strtolower(iconv($u,$c.'//TRANSLIT',$s)));
}
Fast function!