cdm/src/main/java/ucar/unidata/util/StringUtil2.java
static public String remove(String s, int c) {
    if (0 > s.indexOf(c)) {  // none
      return s;
    }

    StringBuilder buff = new StringBuilder(s);
    int i = 0;
    while (i < buff.length()) {
      if (buff.charAt(i) == c) {
        buff.deleteCharAt(i);
      } else {
        i++;
      }
    }
    return buff.toString();
  }
static public String remove(String s, int c) {
    if (0 > s.indexOf(c)) {  // none
      return s;
    }

    StringBuilder buff = new StringBuilder(s);
    int i = 0;
    while (i < buff.length()) {
      if (buff.charAt(i) == c) {
        buff.deleteCharAt(i);
      } else {
        i++;
      }
    }
    return buff.toString();
  }
static public String remove ( String s , int c ) { if ( 0 > s . indexOf ( c ) ) { // none
 return s ; } StringBuilder buff = new StringBuilder ( s ) ; int i = 0 ; while ( i < buff . length ( ) ) { if ( buff . charAt ( i ) == c ) { buff . deleteCharAt ( i ) ; } else { i ++ ; } } return buff . toString ( ) ; }
Remove all occurrences of the character c in the string s.

@param s operate on this string
@param c remove all occurrences of this character.
@return result with any character c removed
Remove all occurrences of the character c in the string s .