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

◆ TryParse() [14/16]

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

Definition at line 2314 of file Utf8Parser.cs.

2315 {
2316 while (standardFormat != 0)
2317 {
2318 switch (standardFormat | 0x20)
2319 {
2320 case 100:
2321 case 103:
2322 break;
2323 case 110:
2324 return TryParseUInt32N(source, out value, out bytesConsumed);
2325 case 120:
2326 return TryParseUInt32X(source, out value, out bytesConsumed);
2327 default:
2328 return ParserHelpers.TryParseThrowFormatException<uint>(source, out value, out bytesConsumed);
2329 }
2330 standardFormat = '\0';
2331 }
2332 return TryParseUInt32D(source, out value, out bytesConsumed);
2333 }
static bool TryParseUInt32N(ReadOnlySpan< byte > source, out uint value, out int bytesConsumed)
static bool TryParseUInt32D(ReadOnlySpan< byte > source, out uint value, out int bytesConsumed)
static bool TryParseUInt32X(ReadOnlySpan< byte > source, out uint value, out int bytesConsumed)

References System.source, System.Buffers.Text.ParserHelpers.TryParseThrowFormatException(), System.Buffers.Text.Utf8Parser.TryParseUInt32D(), System.Buffers.Text.Utf8Parser.TryParseUInt32N(), System.Buffers.Text.Utf8Parser.TryParseUInt32X(), and System.value.