firstIndexIn method
Returns the last matching index in sequence
starting at start
(inclusive). Returns -1
if it could not be found.
Implementation
int firstIndexIn(String sequence, [int start = 0]) {
final codeUnits = sequence.codeUnits;
for (var i = start; i < codeUnits.length; i++) {
if (match(codeUnits[i])) {
return i;
}
}
return -1;
}