digitsAfterFirst method

num digitsAfterFirst(
  1. num substring
)

Get the digits after the first occurrence of substring in the number Returns the digits after the first occurrence of substring in the number

Implementation

num digitsAfterFirst(num substring) {
  var index = toString().indexOf(substring.toString());
  if (index == -1) return 0;
  var result = toString().substring(index + 1);
  return int.parse(result);
}