onlyDigits method

String onlyDigits()

Extract only digits from the string.

Implementation

String onlyDigits() {
  return replaceAll(RegExp(r'\D'), '');
}