public static String deleteAny(String inString,String charsToDelete){
  if (!hasLength(inString) || !hasLength(charsToDelete)) {
    return inString;
  }
  StringBuilder sb=new StringBuilder();
  for (int i=0; i < inString.length(); i++) {
    char c=inString.charAt(i);
    if (charsToDelete.indexOf(c) == -1) {
      sb.append(c);
    }
  }
  return sb.toString();
}

public static String deleteAny ( String inString , String charsToDelete ) { if ( ! hasLength ( inString ) || ! hasLength ( charsToDelete ) ) { return inString ; } StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < inString . length ( ) ; i ++ ) { char c = inString . charAt ( i ) ; if ( charsToDelete . indexOf ( c ) == - 1 ) { sb . append ( c ) ; } } return sb . toString ( ) ; }
delete any character in a given string .
