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

◆ TryParse() [2/16]

static bool System.Buffers.Text.Utf8Parser.TryParse ( ReadOnlySpan< byte > source,
out byte value,
out int bytesConsumed,
char standardFormat = '\0' )
inlinestatic

Definition at line 2270 of file Utf8Parser.cs.

2271 {
2272 while (standardFormat != 0)
2273 {
2274 switch (standardFormat | 0x20)
2275 {
2276 case 100:
2277 case 103:
2278 break;
2279 case 110:
2280 return TryParseByteN(source, out value, out bytesConsumed);
2281 case 120:
2282 return TryParseByteX(source, out value, out bytesConsumed);
2283 default:
2284 return ParserHelpers.TryParseThrowFormatException<byte>(source, out value, out bytesConsumed);
2285 }
2286 standardFormat = '\0';
2287 }
2288 return TryParseByteD(source, out value, out bytesConsumed);
2289 }
static bool TryParseByteX(ReadOnlySpan< byte > source, out byte value, out int bytesConsumed)
static bool TryParseByteN(ReadOnlySpan< byte > source, out byte value, out int bytesConsumed)
static bool TryParseByteD(ReadOnlySpan< byte > source, out byte value, out int bytesConsumed)

References System.source, System.Buffers.Text.Utf8Parser.TryParseByteD(), System.Buffers.Text.Utf8Parser.TryParseByteN(), System.Buffers.Text.Utf8Parser.TryParseByteX(), System.Buffers.Text.ParserHelpers.TryParseThrowFormatException(), and System.value.