Checks if the given string s contains only ascii chars
s
static bool isAscii(String s) { try { asciiCodec.decode(s.codeUnits); } catch (e) { return false; } return true; }