Nodejs String Capitalize ucfirst()

Here you can find the source of ucfirst()

Method Source Code

String.prototype.ucfirst=function(){
   var split=this.split('');
   split[0]=split[0].toUpperCase();/*ww  w  . java2s .  c o m*/
   return split.join('');
};

Related

  1. ucfirst()
    String.prototype.ucfirst = function () {
        return this.charAt(0).toUpperCase() + this.slice(1);
    };
    
  2. ucfirst()
    String.prototype.ucfirst = function() {
      return this.charAt(0) + this.slice(1);
    
  3. ucfirst()
    String.prototype.ucfirst = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
    
  4. ucfirst()
    String.prototype.ucfirst = function()
        return this.charAt(0).toUpperCase() + this.substr(1);
    };
    
  5. ucfirst()
    String.prototype.ucfirst = function() {
        return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
    
  6. ucfirst()
    String.prototype.ucfirst = function() {
      this.toLowerCase().replace(/\b([a-z])/, function(c){
        return c.toUpperCase();
      });
    };
    
  7. ucfirst()
    String.prototype.ucfirst = function() {
        return this.charAt(0).toUpperCase() + this.substr(1);
    };
    function isset(args) {
      return (typeof args !== 'undefined' && args !== null);
    
  8. ucfirst()
    String.prototype.ucfirst = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
    String.prototype.lcfirst = function() {
        return this.charAt(0).toLowerCase() + this.slice(1);
    
  9. ucfirst()
    String.prototype.ucfirst = function() {
      return this.substr(0, 1).toUpperCase() + this.substr(1, this.length);
    };