Created
April 12, 2019 17:50
-
-
Save felipeslongo/de29dae0839c817136a30b4653a5c4b3 to your computer and use it in GitHub Desktop.
Encapsulates a string that is case insensitive and dont care about accents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Core.Extensions; | |
namespace Core.ValueTypes | |
{ | |
public class StringCaseInsensitiveUnaccented | |
{ | |
public static bool Compare(string a, string b) | |
=> a.RemoveDiacritics().ToUpper().Equals(b.RemoveDiacritics().ToUpper()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment