You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the project targetting the framework net9.0-ios, IndexOf method doesn't work properly on strings in other cultures than "en" when the string is not found.
Note: It works properly in the Console application build for net9.0
Steps to Reproduce
This code returns "4" but "-1" is expected:
return "test".IndexOf("x", "test".Length)
Apple platform
iOS
Framework version
net9.0-*
Affected platform version
.NET 9.0.100
Description
In the project targetting the framework net9.0-ios, IndexOf method doesn't work properly on strings in other cultures than "en" when the string is not found.
Note: It works properly in the Console application build for net9.0
Steps to Reproduce
This code returns "4" but "-1" is expected:
return "test".IndexOf("x", "test".Length)
Sample sln is attached.
iOSApp1.zip
Did you find any workaround?
StringComparison.Ordinal must be explicitly used for IndeOf method.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: