-
Notifications
You must be signed in to change notification settings - Fork 5k
String.EndsWith on CoreCLR \ Linux does not work correctly for line feeds #15741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In this specific case, using StringComparision.Ordinal (to force Ordinal comparison) should address the issue until the code is fixed. It also turns out that doing so will give you better performance as Ordinal comparisions (which is what you want here) are faster than linguistic comparisions. |
👍 We switched to looking at the underlying chars in our code since we were needlessly creating the string from a |
@pranavkm Event better! |
Feel free to close this bug if the issue is independently tracked. |
@pranavkm I cannot reproduce this issue. could you please try it and let me know if you still see the problem? |
To conclude this issue and clarify the expected behavior:
Please let me know if you have any question. Thanks. |
Here's the repro example:
Expected: True True
Actual: False True
I used DNX v1.0.0-rc2-16216 to run this application. The version of
System.Console
I used was4.0.0-beta-23516
. Running it with DNX Mono or running this on Windows produces the right results.The text was updated successfully, but these errors were encountered: