Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ByteArrayHelpers.cs
Go to the documentation of this file.
1
namespace
System
;
2
3
internal
static
class
ByteArrayHelpers
4
{
5
internal
static
bool
EqualsOrdinalAsciiIgnoreCase
(
string
left,
ReadOnlySpan<byte>
right)
6
{
7
if
(left.Length != right.
Length
)
8
{
9
return
false
;
10
}
11
for
(
int
i = 0; i < left.Length; i++)
12
{
13
uint num = left[i];
14
uint num2 = right[i];
15
if
(num - 97 <= 25)
16
{
17
num -= 32;
18
}
19
if
(num2 - 97 <= 25)
20
{
21
num2 -= 32;
22
}
23
if
(num != num2)
24
{
25
return
false
;
26
}
27
}
28
return
true
;
29
}
30
31
internal
static
bool
EqualsOrdinalAscii
(
string
left,
ReadOnlySpan<byte>
right)
32
{
33
if
(left.Length != right.
Length
)
34
{
35
return
false
;
36
}
37
for
(
int
i = 0; i < left.Length; i++)
38
{
39
if
(left[i] != right[i])
40
{
41
return
false
;
42
}
43
}
44
return
true
;
45
}
46
}
System.ByteArrayHelpers.EqualsOrdinalAscii
static bool EqualsOrdinalAscii(string left, ReadOnlySpan< byte > right)
Definition
ByteArrayHelpers.cs:31
System.ByteArrayHelpers.EqualsOrdinalAsciiIgnoreCase
static bool EqualsOrdinalAsciiIgnoreCase(string left, ReadOnlySpan< byte > right)
Definition
ByteArrayHelpers.cs:5
System.ByteArrayHelpers
Definition
ByteArrayHelpers.cs:4
System
Definition
BlockingCollection.cs:8
System.ReadOnlySpan.Length
int Length
Definition
ReadOnlySpan.cs:70
System.ReadOnlySpan
Definition
ReadOnlySpan.cs:14
source
System.Net.Http
System
ByteArrayHelpers.cs
Generated by
1.10.0