Here you can find the source of replaceAll()
String.prototype.replaceAll = function() { var target = this; return target.split(" ").join("-"); }; String.prototype.numberToString = function() { var target = this; var storing = ""; var strlength = target.length; var numbers = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]; for(var a = 0; a < strlength; a++) { if(isNaN( target[a]) || target[a] == " ") { storing += target[a];//from w ww. j ava2 s . c o m } else { for(var i = 0; i < 10; i++) { if(target[a] == i) { storing += numbers[i]; } } } } return storing; };
String.prototype.replaceAll = function( token, newToken, ignoreCase ) { var _token; var str = this + ""; var i = -1; if ( typeof token === "string" ) { if ( ignoreCase ) { _token = token.toLowerCase(); while( ( i = str.toLowerCase().indexOf( ...
String.prototype.replaceAll = function( token, newToken, ignoreCase ) { var _token; var str = this + ""; var i = -1; if ( typeof token === "string" ) { if ( ignoreCase ) { _token = token.toLowerCase(); while( ( i = str.toLowerCase().indexOf( ...
String.prototype.replaceAll = function( token, newToken, ignoreCase ) { var _token; var str = this + ""; var i = -1; if ( typeof token === "string" ) { if ( ignoreCase ) { _token = token.toLowerCase(); while( ( i = str.toLowerCase().indexOf( ...
String.prototype.replaceAll = function( token, newToken, ignoreCase ) { var _token; var str = this + ""; var i = -1; if ( typeof token === "string" ) { if ( ignoreCase ) { _token = token.toLowerCase(); while( ( i = str.toLowerCase().indexOf( ...
String.prototype.replaceAll = function($oldText,$replaceText){ return this.replace(new RegExp($oldText,"gm"),$replaceText); };
String.prototype.replaceAll = function(AFindText, ARepText) { var raRegExp = new RegExp(AFindText, "g"); return this.replace(raRegExp, ARepText); };
String.prototype.replaceAll = function (AFindText, ARepText) { return this.replace(new RegExp(AFindText, "gm"), ARepText) };
String.prototype.replaceAll = function(_old, _new){ return this.replace(new RegExp(_old, 'g'), _new) };
String.prototype.replaceAll = function(a, b) { var toReturn = this; var temp; do { temp = toReturn; } while( (toReturn = toReturn.replace(a, b)) !== temp ); return toReturn; ...