Pastetool - replaceALL2

URL: , Paste another

function replaceALL(s,sFrom,sTo) {
  var Index = 0, newStr = "";
  while (s.indexOf(sFrom,Index) != -1) {
	newStr += s.substring(Index,s.indexOf(sFrom,Index));
	newStr += sTo;
	Index = (s.indexOf(sFrom,Index) + sFrom.length);
  }
  newStr += s.substring(Index,s.length);
 return newStr; }

Download code

This javascript code was pasted on September 25, 2009




Protected with advance Anti-SPAM techniques :)
Coded and designed by Fedmich
Follow us on Twitter