X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=String.js;h=50969989b4a9a85f6c9478be5d25739d9b8d0954;hb=61c726d90ac8dc8f5c38582448500c515bb8c5c6;hp=f5a603e79dc40d54767f8da2f31f422a2fc1d630;hpb=93fc5933b87cb5972ca0d70536da62542a854862;p=roojs1 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); +}; +