Query: Consider translating String.Equals(String, StringComparison) for selected values of StringComparison
See original GitHub issueCurrently we support the ==
operator and the String.Equals(String)
methods which both have the same behavior in-memory as String.Equals(String, StringComparison.Ordinal)
. We could also support the latter without making significant changes and possibility other values of StringComparsion such as OrdinalIgnoreCase by applying LOWER()
on both operands.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:50
- Comments:110 (51 by maintainers)
Top Results From Across the Web
String.Equals() not working as intended
Use the String.Compare() as it can be translated to Sql. Here are some examples of string matching in Linq, with the Sql translation...
Read more >Best Practices for Comparing Strings in .NET
Don't use an overload of the String.Compare or CompareTo method and test for a return value of zero to determine whether two strings...
Read more >JavaScript String Comparison – How to Compare Strings in ...
You may want to compare two strings to know which is higher or lower alphabetically or to see if they are equal.
Read more >String Comparison
I fixed it by converting both strings to binary and using the "compare" function of the binary API. This method works, however I...
Read more >Compare strings in C#
Use the Equals() method to compare strings case-insensitive using StringComparison parameter. Example: Copy. string str1 = "LONDON"; string str2 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@xperiandri Still does not work in 3.0 I was shocked that it doesn’t! 😂😂
Maybe you would add Roslyn analyzer that will display info about that in design time? Because having this warning in runtime is not an excellent experience.