List of utility methods to do String to Upper Case
upcase()String.prototype.upcase = function(){ return this.toUpperCase(); }; | |
upperCaseFirst()String.prototype.upperCaseFirst = function() { return this.replace(/^./, function(a) { return a.toUpperCase(); }); }; | |
upperFirstChar()String.prototype.upperFirstChar = function() { return this.charAt(0).toUpperCase() + this.slice(1) | |
upperFirstLetter()String.prototype.upperFirstLetter = function() { return this.charAt(0).toUpperCase() + this.slice(1); | |
upperInitial()String.prototype.upperInitial = function() { return this.replace(/(^|\s+)\w/g, function(s) { return s.toUpperCase(); }); }; | |
uppercase()String.prototype.uppercase = function() { return this.toUpperCase() }; | |
uppercaseFirstLetter()String.prototype.uppercaseFirstLetter = function() { return this.charAt(0).toUpperCase() + this.slice(1); }; |