Node.js examples for String:Replace
Remove Underscore And Dash
String.prototype.removeUnderscoreAndDash = function () { var intString = this; for(var k=0; k < intString.length; k++) {/* w ww .ja v a 2 s . c o m*/ if(intString[k] == '-' || intString[k] == '_'){ intString = intString.substr(0,k)+" "+intString.substr(k+1,intString.length); } } return intString; } String.prototype.prettyString = function () { return this.removeUnderscoreAndDash().ucFirstAll(); }