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

◆ StartsWith()

bool System.Reflection.Metadata.Ecma335.StringHeap.StartsWith ( StringHandle handle,
string value,
MetadataStringDecoder utf8Decoder,
bool ignoreCase )
inlinepackage

Definition at line 163 of file StringHeap.cs.

164 {
165 if (handle.IsVirtual)
166 {
167 return GetString(handle, utf8Decoder).StartsWith(value, ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
168 }
169 if (handle.IsNil)
170 {
171 return value.Length == 0;
172 }
173 char terminator = ((handle.StringKind == StringKind.DotTerminated) ? '.' : '\0');
174 return Block.Utf8NullTerminatedStartsWith(handle.GetHeapOffset(), value, utf8Decoder, terminator, ignoreCase);
175 }
bool Utf8NullTerminatedStartsWith(int offset, string text, MetadataStringDecoder utf8Decoder, char terminator, bool ignoreCase)
string GetString(StringHandle handle, MetadataStringDecoder utf8Decoder)
Definition StringHeap.cs:53

References System.Reflection.Metadata.Ecma335.StringHeap.Block, System.Reflection.Metadata.Ecma335.StringHeap.GetString(), System.handle, System.Reflection.Internal.MemoryBlock.Utf8NullTerminatedStartsWith(), and System.value.