lastIndexOf method Null safety

int? lastIndexOf(
  1. Pattern pattern,
  2. [int? start]
)

Returns the starting position of the last match pattern in this string, searching backward starting at start, inclusive:

Implementation

int? lastIndexOf(Pattern pattern, [int? start]) {
  return value?.lastIndexOf(pattern, start);
}