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

◆ ConsumeLiteralMultiSegment()

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

Definition at line 2329 of file Utf8JsonReader.cs.

2330 {
2331 ReadOnlySpan<byte> span = _buffer.Slice(_consumed);
2332 int consumed = literal.Length;
2333 if (!span.StartsWith(literal))
2334 {
2335 int consumed2 = _consumed;
2337 {
2339 return false;
2340 }
2341 }
2342 else
2343 {
2344 ValueSpan = span.Slice(0, literal.Length);
2345 HasValueSequence = false;
2346 }
2347 _tokenType = tokenType;
2350 return true;
2351 }
ReadOnlySpan< T > Slice(int start)
bool CheckLiteralMultiSegment(ReadOnlySpan< byte > span, ReadOnlySpan< byte > literal, out int consumed)

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.CheckLiteralMultiSegment(), System.Text.Json.Dictionary, System.Text.Json.Utf8JsonReader.HasValueSequence, System.ReadOnlySpan< T >.Slice(), and System.Text.Json.Utf8JsonReader.ValueSpan.

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