Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TernaryTreeReadOnly.cs
Go to the documentation of this file.
1namespace System.Xml;
2
3internal sealed class TernaryTreeReadOnly
4{
5 private readonly byte[] _nodeBuffer;
6
11
13 {
14 int num = 0;
15 int num2 = 0;
16 byte[] nodeBuffer = _nodeBuffer;
17 int num3 = stringToFind[num];
18 if (num3 > 122)
19 {
20 return 0;
21 }
22 if (num3 >= 97)
23 {
24 num3 -= 32;
25 }
26 while (true)
27 {
28 int num4 = num2 * 4;
29 int num5 = nodeBuffer[num4];
30 if (num3 < num5)
31 {
32 if (nodeBuffer[num4 + 1] == 0)
33 {
34 break;
35 }
36 num2 += nodeBuffer[num4 + 1];
37 continue;
38 }
39 if (num3 > num5)
40 {
41 if (nodeBuffer[num4 + 2] == 0)
42 {
43 break;
44 }
45 num2 += nodeBuffer[num4 + 2];
46 continue;
47 }
48 if (num3 == 0)
49 {
50 return nodeBuffer[num4 + 3];
51 }
52 num2++;
53 num++;
54 if (num == stringToFind.Length)
55 {
56 num3 = 0;
57 continue;
58 }
59 num3 = stringToFind[num];
60 if (num3 > 122)
61 {
62 return 0;
63 }
64 if (num3 >= 97)
65 {
66 num3 -= 32;
67 }
68 }
69 return 0;
70 }
71}
byte FindCaseInsensitiveString(string stringToFind)