lastIndexOf method

int lastIndexOf(
  1. String str, [
  2. int? start
])

Returns the index of the last occurrence of the specified string.

str the string to search for start the starting index from the end (optional) Returns -1 if not found

Implementation

int lastIndexOf(String str, [int? start]) {
  return _buffer.toString().lastIndexOf(str, start);
}