cdm/src/main/java/ucar/unidata/util/StringUtil2.java
static public String replace(String s, char out, String in) {
    if (s.indexOf(out) < 0) {
      return s;
    }

    // gotta do it
    StringBuilder sb = new StringBuilder(s);
    replace(sb, out, in);
    return sb.toString();
  }
static public String replace(String s, char out, String in) {
    if (s.indexOf(out) < 0) {
      return s;
    }

    // gotta do it
    StringBuilder sb = new StringBuilder(s);
    replace(sb, out, in);
    return sb.toString();
  }
static public String replace ( String s , char out , String in ) { if ( s . indexOf ( out ) < 0 ) { return s ; } // gotta do it
 StringBuilder sb = new StringBuilder ( s ) ; replace ( sb , out , in ) ; return sb . toString ( ) ; }
Replace any char "out" in s with "in".

@param s   string to replace
@param out replace this character
@param in  with this string
@return modified string if needed
Replace any char out in s with in .