static bool isAsciiChar(String ch) { if (ch.length != 1) { return false; } else { final int codeUnit = ch.codeUnitAt(0); return codeUnit >= 32 && codeUnit <= 126; } }