X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=String.js;h=50969989b4a9a85f6c9478be5d25739d9b8d0954;hp=f5a603e79dc40d54767f8da2f31f422a2fc1d630;hb=18480d449e889bafc18e683dca94b2ff4729dbd4;hpb=df2e2de75c4a885e8935bbf1d745c498c9055beb diff --git a/String.js b/String.js index f5a603e79d..50969989b4 100644 --- a/String.js +++ b/String.js @@ -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); +}; +