cdm/src/main/java/ucar/unidata/util/StringUtil2.java
public static String removeWhitespace(String inputString) {
    StringBuilder sb = new StringBuilder();
    char[] chars = inputString.toCharArray();
    for (char c : chars) {
      if (Character.isWhitespace(c)) {
        continue;
      }
      sb.append(c);
    }
    return sb.toString();
  }
public static String removeWhitespace(String inputString) {
    StringBuilder sb = new StringBuilder();
    char[] chars = inputString.toCharArray();
    for (char c : chars) {
      if (Character.isWhitespace(c)) {
        continue;
      }
      sb.append(c);
    }
    return sb.toString();
  }
public static String removeWhitespace ( String inputString ) { StringBuilder sb = new StringBuilder ( ) ; char [ ] chars = inputString . toCharArray ( ) ; for ( char c : chars ) { if ( Character . isWhitespace ( c ) ) { continue ; } sb . append ( c ) ; } return sb . toString ( ) ; }
Remove any whitespace (ie., Character.isWhitespace) from the input string.

@param inputString The string to remove the whitespace.
@return The whitespaceless result.
Remove any whitespace ( ie . Character . isWhitespace ) from the input string .