StringUtil { public static boolean isWhitespace(char charCode) { return Character.isWhitespace(charCode) || Character.getType(charCode) == Character.SPACE_SEPARATOR; }  static boolean isWhitespace(char charCode); static boolean isWhitespace(int charCode); static String toLowerCase(CharSequence string); static String toUpperCase(CharSequence string); static boolean isEmpty(CharSequence theString);  }
@Test public void testNoBreakSpace() { assertTrue(StringUtil.isWhitespace(0x00A0)); assertTrue(StringUtil.isWhitespace(0x2007)); assertTrue(StringUtil.isWhitespace(0x202F)); assertTrue(StringUtil.isWhitespace((char) 0x00A0)); assertTrue(StringUtil.isWhitespace((char) 0x2007)); assertTrue(StringUtil.isWhitespace((char) 0x202F)); }