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

◆ Utf8NullTerminatedOffsetOfAsciiChar()

unsafe int System.Reflection.Internal.MemoryBlock.Utf8NullTerminatedOffsetOfAsciiChar ( int startOffset,
char asciiChar )
inlinepackage

Definition at line 272 of file MemoryBlock.cs.

273 {
274 CheckBounds(startOffset, 0);
275 for (int i = startOffset; i < Length; i++)
276 {
277 byte b = Pointer[i];
278 if (b == 0)
279 {
280 break;
281 }
282 if (b == asciiChar)
283 {
284 return i;
285 }
286 }
287 return -1;
288 }
void CheckBounds(int offset, int byteCount)

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

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