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

◆ TryParse() [15/16]

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

Definition at line 2336 of file Utf8Parser.cs.

2337 {
2338 while (standardFormat != 0)
2339 {
2340 switch (standardFormat | 0x20)
2341 {
2342 case 100:
2343 case 103:
2344 break;
2345 case 110:
2346 return TryParseUInt64N(source, out value, out bytesConsumed);
2347 case 120:
2348 return TryParseUInt64X(source, out value, out bytesConsumed);
2349 default:
2350 return ParserHelpers.TryParseThrowFormatException<ulong>(source, out value, out bytesConsumed);
2351 }
2352 standardFormat = '\0';
2353 }
2354 return TryParseUInt64D(source, out value, out bytesConsumed);
2355 }
static bool TryParseUInt64N(ReadOnlySpan< byte > source, out ulong value, out int bytesConsumed)
static bool TryParseUInt64D(ReadOnlySpan< byte > source, out ulong value, out int bytesConsumed)
static bool TryParseUInt64X(ReadOnlySpan< byte > source, out ulong value, out int bytesConsumed)

References System.source, System.Buffers.Text.ParserHelpers.TryParseThrowFormatException(), System.Buffers.Text.Utf8Parser.TryParseUInt64D(), System.Buffers.Text.Utf8Parser.TryParseUInt64N(), System.Buffers.Text.Utf8Parser.TryParseUInt64X(), and System.value.