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

◆ ConsumeLiteral()

bool System.Text.Json.Utf8JsonReader.ConsumeLiteral ( ReadOnlySpan< byte > literal,
JsonTokenType tokenType )
inlineprivate

Definition at line 808 of file Utf8JsonReader.cs.

809 {
810 ReadOnlySpan<byte> span = _buffer.Slice(_consumed);
811 if (!span.StartsWith(literal))
812 {
813 return CheckLiteral(span, literal);
814 }
815 ValueSpan = span.Slice(0, literal.Length);
816 _tokenType = tokenType;
817 _consumed += literal.Length;
819 return true;
820 }
ReadOnlySpan< T > Slice(int start)
bool CheckLiteral(ReadOnlySpan< byte > span, ReadOnlySpan< byte > literal)

References System.Text.Json.Utf8JsonReader._buffer, System.Text.Json.Utf8JsonReader._bytePositionInLine, System.Text.Json.Utf8JsonReader._consumed, System.Text.Json.Utf8JsonReader._tokenType, System.Text.Json.Utf8JsonReader.CheckLiteral(), System.Text.Json.Dictionary, System.ReadOnlySpan< T >.Slice(), and System.Text.Json.Utf8JsonReader.ValueSpan.

Referenced by System.Text.Json.Utf8JsonReader.ConsumeValue().