Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CaseInsensitiveComparer.cs
Go to the documentation of this file.
2
3namespace System.Collections;
4
6{
7 private readonly CompareInfo _compareInfo;
8
10
12
24
26 {
28 }
29
31 {
32 if (culture == null)
33 {
34 throw new ArgumentNullException("culture");
35 }
37 }
38
39 public int Compare(object? a, object? b)
40 {
41 string text = a as string;
42 string text2 = b as string;
43 if (text != null && text2 != null)
44 {
45 return _compareInfo.Compare(text, text2, CompareOptions.IgnoreCase);
46 }
47 return Comparer.Default.Compare(a, b);
48 }
49}
static volatile CaseInsensitiveComparer s_InvariantCaseInsensitiveComparer
static readonly Comparer Default
Definition Comparer.cs:13
int Compare(string? string1, string? string2)
CompareInfo(CultureInfo culture)
static CultureInfo CurrentCulture
static CultureInfo InvariantCulture