isDigit method

bool isDigit()

Returns true if the string is a digit.

Implementation

bool isDigit() {
  if (validate().isEmpty) return false;
  for (var rune in runes) {
    if (rune ^ 0x30 > 9) return false;
  }
  return true;
}