indexOf method

int indexOf(
  1. String str, [
  2. int start = 0
])

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

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

Implementation

int indexOf(String str, [int start = 0]) {
  return _buffer.toString().indexOf(str, start);
}