protected void replace(final String paramText,final String newText){
  int loc=builder.indexOf(paramText);
  while (loc >= 0) {
    builder.replace(loc,loc + paramText.length(),newText);
    loc=builder.indexOf(paramText);
  }
}

protected void replace ( final String paramText , final String newText ) { int loc = builder . indexOf ( paramText ) ; while ( loc >= 0 ) { builder . replace ( loc , loc + paramText . length ( ) , newText ) ; loc = builder . indexOf ( paramText ) ; } }
replace instances of the old text with a copy of the new text .
