isCharCode static method
Returns whether the character code matches the specified conditions.
ccis the character to test.digitspecifies if it matches digit.upperspecifies if it matches upper case.lowerspecifies if it matches lower case.whitespacespecifies if it matches whitespace.matchspecifies a string of characters that are matched (aka., allowed).
Implementation
static bool isCharCode(int cc, {bool digit = false, bool upper = false,
bool lower = false, bool whitespace = false})
=> (lower && cc >= $a && cc <= $z)
|| (upper && cc >= $A && cc <= $Z)
|| (digit && cc >= $0 && cc <= $9)
|| (whitespace && $whitespaces.contains(cc));