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

◆ FixedBufferEqualsString()

static bool System.FixedBufferExtensions.FixedBufferEqualsString ( this ReadOnlySpan< char > span,
string value )
inlinestaticpackage

Definition at line 25 of file FixedBufferExtensions.cs.

26 {
27 if (value == null || value.Length > span.Length)
28 {
29 return false;
30 }
31 int i;
32 for (i = 0; i < value.Length; i++)
33 {
34 if (value[i] == '\0' || value[i] != span[i])
35 {
36 return false;
37 }
38 }
39 if (i != span.Length)
40 {
41 return span[i] == '\0';
42 }
43 return true;
44 }

References System.ReadOnlySpan< T >.Length, and System.value.