Javascript String uc_words()

Description

Javascript String uc_words()


String.prototype.uc_words = function(){
    return this.replace( /(^|\s)([a-z])/g , function(m,p1,p2){return p1+p2.toUpperCase();});
};



PreviousNext

Related