Returns the position of the last match pattern
in this string, searching
backward starting at start
, inclusive:
var string = 'Dartisans';
string.lastIndexOf('a'); // 6
string.lastIndexOf(new RegExp(r'a(r|n)')); // 6
Returns -1 if other
could not be found.
string.lastIndexOf(new RegExp(r'DART')); // -1
start
must not be negative or greater than length.
Source
int lastIndexOf(Pattern pattern, [int start]);