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

◆ ValidateHexDigits()

bool System.Text.Json.Utf8JsonReader.ValidateHexDigits ( ReadOnlySpan< byte > data,
int idx )
inlineprivate

Definition at line 1002 of file Utf8JsonReader.cs.

1003 {
1004 for (int i = idx; i < data.Length; i++)
1005 {
1006 byte nextByte = data[i];
1007 if (!JsonReaderHelper.IsHexDigit(nextByte))
1008 {
1009 ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidHexCharacterWithinString, nextByte);
1010 }
1011 if (i - idx >= 3)
1012 {
1013 return true;
1014 }
1016 }
1017 return false;
1018 }

References System.Text.Json.Utf8JsonReader._bytePositionInLine, System.Text.Json.Dictionary, System.Text.Json.JsonReaderHelper.IsHexDigit(), System.ReadOnlySpan< T >.Length, and System.Text.Json.ThrowHelper.ThrowJsonReaderException().

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