Upper case first letter in a String - Node.js String

Node.js examples for String:Case

Description

Upper case first letter in a String

Demo Code

//----- (c)GPL, apv
String.prototype.ucFirst = function () {
   return this.substr(0,1).toUpperCase() + this.substr(1,this.length);
}

Related Tutorials