cdm/src/main/java/ucar/unidata/util/StringUtil2.java
static public void replace(StringBuilder sb, String out, String in) {
    for (int i = 0; i < sb.length(); i++) {
      int c = sb.charAt(i);
      for (int j = 0; j < out.length(); j++) {
        if (out.charAt(j) == c)
          sb.setCharAt(i, in.charAt(j));
      }
    }
  }
static public void replace(StringBuilder sb, String out, String in) {
    for (int i = 0; i < sb.length(); i++) {
      int c = sb.charAt(i);
      for (int j = 0; j < out.length(); j++) {
        if (out.charAt(j) == c)
          sb.setCharAt(i, in.charAt(j));
      }
    }
  }
static public void replace ( StringBuilder sb , String out , String in ) { for ( int i = 0 ; i < sb . length ( ) ; i ++ ) { int c = sb . charAt ( i ) ; for ( int j = 0 ; j < out . length ( ) ; j ++ ) { if ( out . charAt ( j ) == c ) sb . setCharAt ( i , in . charAt ( j ) ) ; } } }
Replace any of the characters from out with corresponding character from in

@param sb  the StringBuilder
@param out get rid of any of these characters
@param in  replacing with the character at same index
Replace any of the characters from out with corresponding character from in