String IndexOf is missing API for char with start index and StringComparison #44116
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.Globalization
backlog-cleanup-candidate
An inactive issue that has been marked for automated closure.
no-recent-activity
Milestone
https://docs.microsoft.com/en-us/dotnet/api/system.string.indexof
Background and Motivation
The
string
IndexOf
API is missing two methods forchar
that it has withstring
. It's currently not possible to perform anIndexOf
operation with achar
, start index, andStringComparison
unless you convert thechar
to astring
.The following
string
methods have bothstring
andchar
versions:The following
string
methods are missingchar
versions as counterparts to thestring
versions:Proposed API
Add methods with these signatures to
string
:Usage Examples
Which should behave identically to how it currently works with strings:
Alternative Designs
None.
Risks
None.
The text was updated successfully, but these errors were encountered: