cdm/src/main/java/ucar/unidata/util/StringUtil2.java
static public void unreplace(StringBuilder sb, String out, char in) {
    int pos;
    while (0 <= (pos = sb.indexOf(out))) {
      sb.setCharAt(pos, in);
      sb.delete(pos + 1, pos + out.length());
    }
  }
static public void unreplace(StringBuilder sb, String out, char in) {
    int pos;
    while (0 <= (pos = sb.indexOf(out))) {
      sb.setCharAt(pos, in);
      sb.delete(pos + 1, pos + out.length());
    }
  }
static public void unreplace ( StringBuilder sb , String out , char in ) { int pos ; while ( 0 <= ( pos = sb . indexOf ( out ) ) ) { sb . setCharAt ( pos , in ) ; sb . delete ( pos + 1 , pos + out . length ( ) ) ; } }
Replace any String "out" in sb with char "in".

@param sb  StringBuilder to replace
@param out repalce this String
@param in  with this char
Replace any String out in sb with char in .