6x optimized lcfirst() \o/ though it would be far better not to call these functions too much at all :)
This commit is contained in:
parent
54a855b06e
commit
cedb68a771
1 changed files with 6 additions and 1 deletions
|
|
@ -962,7 +962,12 @@ class Language {
|
|||
}
|
||||
|
||||
function lcfirst( $str ) {
|
||||
return self::lc( $str, true );
|
||||
if ( ord($str[0]) < 128 ) {
|
||||
// editing string in place = cool
|
||||
$str[0]=strtolower($str[0]);
|
||||
return $str;
|
||||
}
|
||||
else return self::lc( $str, true );
|
||||
}
|
||||
|
||||
function lc( $str, $first = false ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue