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

◆ ConsumeStringMultiSegment()

bool System.Text.Json.Utf8JsonReader.ConsumeStringMultiSegment ( )
inlineprivate

Definition at line 2492 of file Utf8JsonReader.cs.

2493 {
2494 ReadOnlySpan<byte> readOnlySpan = _buffer.Slice(_consumed + 1);
2495 int num = readOnlySpan.IndexOfQuoteOrAnyControlOrBackSlash();
2496 if (num >= 0)
2497 {
2498 byte b = readOnlySpan[num];
2499 if (b == 34)
2500 {
2501 _bytePositionInLine += num + 2;
2502 ValueSpan = readOnlySpan.Slice(0, num);
2503 HasValueSequence = false;
2504 _stringHasEscaping = false;
2505 _tokenType = JsonTokenType.String;
2506 _consumed += num + 2;
2507 return true;
2508 }
2510 }
2511 if (IsLastSpan)
2512 {
2514 ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound, 0);
2515 }
2516 return ConsumeStringNextSegment();
2517 }
ReadOnlySpan< T > Slice(int start)
bool ConsumeStringAndValidateMultiSegment(ReadOnlySpan< byte > data, int idx)

References System.Text.Json.Utf8JsonReader._buffer, System.Text.Json.Utf8JsonReader._bytePositionInLine, System.Text.Json.Utf8JsonReader._consumed, System.Text.Json.Utf8JsonReader._stringHasEscaping, System.Text.Json.Utf8JsonReader._tokenType, System.Text.Json.Utf8JsonReader.ConsumeStringAndValidateMultiSegment(), System.Text.Json.Utf8JsonReader.ConsumeStringNextSegment(), System.Text.Json.Dictionary, System.Text.Json.Utf8JsonReader.HasValueSequence, System.Text.Json.Utf8JsonReader.IsLastSpan, System.ReadOnlySpan< T >.Slice(), System.Text.Json.ThrowHelper.ThrowJsonReaderException(), and System.Text.Json.Utf8JsonReader.ValueSpan.

Referenced by System.Text.Json.Utf8JsonReader.ConsumePropertyNameMultiSegment(), and System.Text.Json.Utf8JsonReader.ConsumeValueMultiSegment().