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

◆ TryParseUInt32Number()

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

Definition at line 4748 of file Number.cs.

4749 {
4750 result = 0u;
4751 byte* digits = stackalloc byte[11];
4752 NumberBuffer number = new NumberBuffer(NumberBufferKind.Integer, digits, 11);
4753 if (!TryStringToNumber(value, styles, ref number, info))
4754 {
4755 return ParsingStatus.Failed;
4756 }
4757 if (!TryNumberToUInt32(ref number, ref result))
4758 {
4759 return ParsingStatus.Overflow;
4760 }
4761 return ParsingStatus.OK;
4762 }
static unsafe bool TryNumberToUInt32(ref NumberBuffer number, ref uint value)
Definition Number.cs:3937
static unsafe bool TryStringToNumber(ReadOnlySpan< char > value, NumberStyles styles, ref NumberBuffer number, NumberFormatInfo info)
Definition Number.cs:5832

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

Referenced by System.Number.TryParseUInt32().