-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-coretype-documentationA request to add or improve documentationA request to add or improve documentation
Description
https://api.dart.dev/stable/2.8.2/dart-core/String/lastIndexOf.html states:
Returns the position of the last match
patternin this string, searching backward starting atstart, inclusive:
Is 'foobar'.lastIndexOf('foo') supposed to return 0 or 2?
I think that this would be clearer as something like "Returns the starting position".
Additionally, the examples unfortunately happen to use search patterns that match only a single character. The lone example that uses a longer search pattern is for a case where the string isn't found. Changing the examples to use longer search patterns also would clarify the expected behavior.
Metadata
Metadata
Assignees
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-coretype-documentationA request to add or improve documentationA request to add or improve documentation