static public String stripChar(String str,char ch){
  if (str != null) {
    char[] buffer=new char[str.length()];
    int next=0;
    for (int i=0; i < str.length(); i++) {
      if (str.charAt(i) != ch) {
        buffer[next++]=str.charAt(i);
      }
    }
    return new String(buffer,0,next);
  }
 else {
    return null;
  }
}

static public String stripChar ( String str , char ch ) { if ( str != null ) { char [ ] buffer = new char [ str . length ( ) ] ; int next = 0 ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { if ( str . charAt ( i ) != ch ) { buffer [ next ++ ] = str . charAt ( i ) ; } } return new String ( buffer , 0 , next ) ; } else { return null ; } }
remove all occurances of the given character from the string argument .
