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

◆ GetHashCode()

int System.Net.CaseInsensitiveAscii.GetHashCode ( object myObject)
inline

Implements System.Collections.IEqualityComparer.

Definition at line 39 of file CaseInsensitiveAscii.cs.

40 {
41 if (!(myObject is string { Length: var length } text))
42 {
43 return 0;
44 }
45 if (length == 0)
46 {
47 return 0;
48 }
49 return length ^ ((AsciiToLower[(byte)text[0]] << 24) ^ (AsciiToLower[(byte)text[length - 1]] << 16));
50 }
static ReadOnlySpan< byte > AsciiToLower

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