dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54a855b
)
6x optimized lcfirst() \o/ though it would be far better not to call these functions...
author
Domas Mituzas
<midom@users.mediawiki.org>
Mon, 12 Nov 2007 22:34:39 +0000
(22:34 +0000)
committer
Domas Mituzas
<midom@users.mediawiki.org>
Mon, 12 Nov 2007 22:34:39 +0000
(22:34 +0000)
languages/Language.php
patch
|
blob
|
history
diff --git
a/languages/Language.php
b/languages/Language.php
index
a2d313f
..
bbdbbc5
100644
(file)
--- a/
languages/Language.php
+++ b/
languages/Language.php
@@
-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 ) {