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

◆ Utf8NullTerminatedStringStartsWithAsciiPrefix()

unsafe bool System.Reflection.Internal.MemoryBlock.Utf8NullTerminatedStringStartsWithAsciiPrefix ( int offset,
string asciiPrefix )
inlinepackage

Definition at line 366 of file MemoryBlock.cs.

367 {
369 if (asciiPrefix.Length > Length - offset)
370 {
371 return false;
372 }
373 byte* ptr = Pointer + offset;
374 for (int i = 0; i < asciiPrefix.Length; i++)
375 {
376 if (asciiPrefix[i] != *ptr)
377 {
378 return false;
379 }
380 ptr++;
381 }
382 return true;
383 }
void CheckBounds(int offset, int byteCount)

References System.Reflection.Internal.MemoryBlock.CheckBounds(), System.Reflection.Internal.MemoryBlock.Length, and System.offset.

Referenced by System.Reflection.Metadata.Ecma335.StringHeap.StartsWithRaw().