isDigit function

bool isDigit(
  1. String? ch
)

Implementation

bool isDigit(String? ch) {
  if (ch == null) {
    return false;
  }

  if (ch.isEmpty) {
    return false;
  }

  int rune = ch.codeUnitAt(0);
  return rune ^ 0x30 <= 9;
}