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:
f1b79b7
)
Optimize ucFirst by using charAt
author
Krinkle
<krinkle@users.mediawiki.org>
Thu, 1 Sep 2011 17:25:33 +0000
(17:25 +0000)
committer
Krinkle
<krinkle@users.mediawiki.org>
Thu, 1 Sep 2011 17:25:33 +0000
(17:25 +0000)
resources/jquery/jquery.mwExtension.js
patch
|
blob
|
history
diff --git
a/resources/jquery/jquery.mwExtension.js
b/resources/jquery/jquery.mwExtension.js
index
7b37bb7
..
023ea7f
100644
(file)
--- a/
resources/jquery/jquery.mwExtension.js
+++ b/
resources/jquery/jquery.mwExtension.js
@@
-12,7
+12,7
@@
'' : str.toString().replace( /\s+$/, '' );
},
ucFirst: function( str ) {
- return str.
substr( 0, 1
).toUpperCase() + str.substr( 1 );
+ return str.
charAt( 0
).toUpperCase() + str.substr( 1 );
},
escapeRE: function( str ) {
return str.replace ( /([\\{}()|.?*+\-^$\[\]])/g, "\\$1" );