Graal Pastebin
New PastePasted on June 15, 2012.
View the raw file
// minimal func_strings class function replacetext(txt,a,b) { // credit to Dusty if (txt.pos(a)<0) return txt; temp.txtpos = txt.positions(a); temp.newtxt = txt.substring(0,txtpos[0]); for (temp.i=0;i<txtpos.size();i++) { newtxt @= b; newtxt @= txt.substring(txtpos[i]+a.length(),txt.substring(txtpos[i]+a.length()).pos(a)); } return newtxt; }