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

◆ TryParseUInt64Number()

static unsafe ParsingStatus System.Number.TryParseUInt64Number ( ReadOnlySpan< char > value,
NumberStyles styles,
NumberFormatInfo info,
out ulong result )
inlinestaticprivate

Definition at line 5132 of file Number.cs.

5133 {
5134 result = 0uL;
5135 byte* digits = stackalloc byte[21];
5136 NumberBuffer number = new NumberBuffer(NumberBufferKind.Integer, digits, 21);
5137 if (!TryStringToNumber(value, styles, ref number, info))
5138 {
5139 return ParsingStatus.Failed;
5140 }
5141 if (!TryNumberToUInt64(ref number, ref result))
5142 {
5143 return ParsingStatus.Overflow;
5144 }
5145 return ParsingStatus.OK;
5146 }
static unsafe bool TryNumberToUInt64(ref NumberBuffer number, ref ulong value)
Definition Number.cs:3967
static unsafe bool TryStringToNumber(ReadOnlySpan< char > value, NumberStyles styles, ref NumberBuffer number, NumberFormatInfo info)
Definition Number.cs:5832

References System.info, System.Number.TryNumberToUInt64(), System.Number.TryStringToNumber(), and System.value.

Referenced by System.Number.TryParseUInt64().