Thanks for reporting this. You were partly right, and the documentation was contributing to the confusion.
Array.IndexOf(item, startIndex) and Array.IndexOf(item, startIndex, count) already exist in 26.7.2, but the Array documentation only showed IndexOf(item). I will correct the documentation to include those overloads.
You were right that arrays had no supported way to request case-sensitive string matching so I’ve added the following overloads for the next release:
values.Contains(item, caseSensitive)
values.IndexOf(item, caseSensitive)
values.IndexOf(item, startIndex, caseSensitive)
values.IndexOf(item, startIndex, count, caseSensitive)
String matching remains case-insensitive by default. Pass True for an exact, case-sensitive match.
I haven’t added startIndex to Contains(), because IndexOf(item, startIndex) >= 0 already covers that use case.
While investigating, I also found and fixed an inconsistency affecting arrays returned by String.Split(): their IndexOf() and Contains() searches were accidentally case-sensitive, unlike ordinary arrays. They now behave consistently.
Thanks again. The report uncovered both a missing feature and a genuine related bug.
https://feedback.objo.dev/bug/736
https://feedback.objo.dev/feature/735