X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=String.js;h=50969989b4a9a85f6c9478be5d25739d9b8d0954;hp=0e76ae79d0c1029cc5419475883f3c258256f113;hb=a79418f2d639838995134f03eb135328a1039665;hpb=4ef8e367408b569e9466af67f2969357305698a3 diff --git a/String.js b/String.js index 0e76ae79d0..50969989b4 100644 --- a/String.js +++ b/String.js @@ -66,7 +66,7 @@ var s = String.format('
{1}
', cls, text); return format.replace(/\{(\d+)\}/g, function(m, i){ return Roo.util.Format.htmlEncode(args[i]); }); - }. + } }); @@ -114,3 +114,13 @@ String.prototype.unicodeClean = function () { ); }; + +/** + * Make the first letter of a string uppercase + * + * @return {String} The new string. + */ +String.prototype.toUpperCaseFirst = function () { + return this.charAt(0).toUpperCase() + this.slice(1); +}; +