public static final String chopWhitespace(String str) {
if(null==str || "".equals(str))return "";
StringBuilder sb = new StringBuilder("");
for (int i = 0; i < str.length(); i++) {
char ch = str.charAt(i);
int ci = ch;
//System.out.println(ch+" "+ci);
if (9 == ci || 10 == ci || 13 == ci || 32 <= ci && !Character.isISOControl(ci)) {
sb.append(ch);
}
}
return sb.toString();
}