Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MetadataStringComparer.cs
Go to the documentation of this file.
2
3public readonly struct MetadataStringComparer
4{
5 private readonly MetadataReader _reader;
6
8 {
9 _reader = reader;
10 }
11
12 public bool Equals(StringHandle handle, string value)
13 {
14 return Equals(handle, value, ignoreCase: false);
15 }
16
17 public bool Equals(StringHandle handle, string value, bool ignoreCase)
18 {
19 if (value == null)
20 {
22 }
23 return _reader.StringHeap.Equals(handle, value, _reader.UTF8Decoder, ignoreCase);
24 }
25
27 {
28 return Equals(handle, value, ignoreCase: false);
29 }
30
31 public bool Equals(NamespaceDefinitionHandle handle, string value, bool ignoreCase)
32 {
33 if (value == null)
34 {
36 }
37 if (handle.HasFullName)
38 {
39 return _reader.StringHeap.Equals(handle.GetFullName(), value, _reader.UTF8Decoder, ignoreCase);
40 }
41 return value == _reader.NamespaceCache.GetFullName(handle);
42 }
43
45 {
46 return Equals(handle, value, ignoreCase: false);
47 }
48
49 public bool Equals(DocumentNameBlobHandle handle, string value, bool ignoreCase)
50 {
51 if (value == null)
52 {
54 }
55 return _reader.BlobHeap.DocumentNameEquals(handle, value, ignoreCase);
56 }
57
58 public bool StartsWith(StringHandle handle, string value)
59 {
60 return StartsWith(handle, value, ignoreCase: false);
61 }
62
63 public bool StartsWith(StringHandle handle, string value, bool ignoreCase)
64 {
65 if (value == null)
66 {
68 }
69 return _reader.StringHeap.StartsWith(handle, value, _reader.UTF8Decoder, ignoreCase);
70 }
71}
static void ValueArgumentNull()
Definition Throw.cs:131
bool StartsWith(StringHandle handle, string value)
bool Equals(DocumentNameBlobHandle handle, string value)
bool Equals(NamespaceDefinitionHandle handle, string value)
bool Equals(StringHandle handle, string value)
bool Equals(DocumentNameBlobHandle handle, string value, bool ignoreCase)
bool Equals(StringHandle handle, string value, bool ignoreCase)
bool StartsWith(StringHandle handle, string value, bool ignoreCase)
bool Equals(NamespaceDefinitionHandle handle, string value, bool ignoreCase)