public static String normalizeDigits(String token){
  StringBuilder sb=new StringBuilder(token.length());
  int len=token.length();
  for (int i=0; i < len; ++i) {
    char c=token.charAt(i);
    sb.append(Character.isDigit(c) ? "0" : c);
  }
  return sb.toString();
}

public static String normalizeDigits ( String token ) { StringBuilder sb = new StringBuilder ( token . length ( ) ) ; int len = token . length ( ) ; for ( int i = 0 ; i < len ; ++ i ) { char c = token . charAt ( i ) ; sb . append ( Character . isDigit ( c ) ? "0" : c ) ; } return sb . toString ( ) ; }
map all characters in the range [ 0 - 9 ] to 0 in the input string .
