isDigitStringInRange function
Implementation
bool isDigitStringInRange(String s, int offset, int length) {
if (length <= 0) return false;
var end = Math.min(s.length, offset + length);
for (var i = offset; i < end; i++) {
var c = s.codeUnitAt(i);
if (!isDigit(c)) return false;
}
return true;
}