Javascript String toFirstCase()
toFirstCase()
String.prototype.toFirstCase = function() { if (this.length >= 1) { return this.substr(0, 1).toUpperCase() + this.substr(1).toLowerCase()/* ww w . j a v a2s . com*/ } return this; };