Open
Description
Type of issue
Other (describe below)
Description
The remarks made on this page related to an empty anyOf character array being passed into the function are wrong. The documentation states:
If anyOf is an empty array, the method finds a match at the beginning of the string (that is, at index zero).
Whereas in reality, -1 is returned. Tested with .NET Framework 4.8 as well as .NET 8.0. Might be different in .NET 10, but then it would be a breaking change, which I haven't found anywhere.
Page URL
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/String.xml
Document Version Independent Id
adc47b27-e2ac-45a7-dd56-77dcb6be0f7f
Platform Id
03aae330-04cc-2e30-ecd8-89dd5afe6fe3