Exemple #1
0
        public override int GetHashCode(string?obj)
        {
            if (obj == null)
            {
                throw new ArgumentNullException(nameof(obj));
            }

            return(_compareInfo.GetHashCode(StringComparerEx.RemoveDiacritics(obj), _compareOptions));
        }
Exemple #2
0
        public override int Compare(string?x, string?y)
        {
            if (ReferenceEquals(x, y))
            {
                return(0);
            }

            if (x == null)
            {
                return(-1);
            }

            if (y == null)
            {
                return(1);
            }

            return(_compareInfo.Compare(StringComparerEx.RemoveDiacritics(x), StringComparerEx.RemoveDiacritics(y), _compareOptions));
        }