check if character is a number
static bool isDigit(String char) { int asciiCode = char.codeUnitAt(0); return (asciiCode >= 48 && asciiCode <= 57); }