Node.js examples for String:Replace
Replace all String value
String.prototype.replaceAll = function replaceAll(a, b){ var s = this;// www . ja v a 2s . co m while(s.indexOf(a) > -1){ s = s.replace(a, b); } return s; };