Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Compare() [1/2]

int System.Net.CaseInsensitiveAscii.Compare ( object firstObject,
object secondObject )
inline

Definition at line 52 of file CaseInsensitiveAscii.cs.

53 {
54 string text = firstObject as string;
55 string text2 = secondObject as string;
56 if (text == null)
57 {
58 if (text2 != null)
59 {
60 return -1;
61 }
62 return 0;
63 }
64 if (text2 == null)
65 {
66 return 1;
67 }
68 int num = text.Length - text2.Length;
69 int num2 = ((num > 0) ? text2.Length : text.Length);
70 for (int i = 0; i < num2; i++)
71 {
72 int num3 = AsciiToLower[text[i]] - AsciiToLower[text2[i]];
73 if (num3 != 0)
74 {
75 num = num3;
76 break;
77 }
78 }
79 return num;
80 }
static ReadOnlySpan< byte > AsciiToLower

References System.Net.CaseInsensitiveAscii.AsciiToLower, and System.text.