Here you can find the source of ucFirst()
String.prototype.ucFirst = function(){ // this regEx replaces the first letter to uppercase value result = this.replace(/^\w/g, function(x){ return x.toUpperCase(); });// w ww .j ava2s.c o m return result; };
String.prototype.ucFirst = function () { return this.charAt(0).toUpperCase() + this.slice(1); };
String.prototype.ucFirst = function() return this.charAt(0).toUpperCase() + this.substr(1);
String.prototype.ucFirst = function(){ var string_array = this.split(' ') _.each(string_array,function(word, key){ var word_array = word.split('') var fChar = word_array.shift() var ucFWord = fChar.toUpperCase()+word_array.join(''); string_array[key] = ucFWord }) return string_array.join(' ') ...
String.prototype.ucFirst = function() { return this.substr(0, 1).toUpper() + this.substr(1); };
String.prototype.ucFirst = function () { return this.substr(0,1).toUpperCase()+this.substr(1); };
String.prototype.ucFirst = function() { return [this.charAt(0).toUpper(), this.slice(1)].join(''); };
String.prototype.ucFirst = function() { return this.charAt(0).toUpperCase() + this.slice(1);
String.prototype.ucFirst = function(){ return this.replace(/^\w/, function(x){ return x.toUpperCase(); })
String.prototype.uc_first = function() { return this.charAt(0).toUpperCase() + this.slice(1); };