isInt method

bool isInt()

Returns true if the string can be converted to an integer, false otherwise.

Implementation

bool isInt() {
  return int.tryParse(this) != null;
}