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

◆ UInt32ToDecStr() [2/2]

static unsafe string System.Number.UInt32ToDecStr ( uint value,
int digits )
inlinestaticprivate

Definition at line 2404 of file Number.cs.

2405 {
2406 if (digits <= 1)
2407 {
2408 return UInt32ToDecStr(value);
2409 }
2410 int num = Math.Max(digits, FormattingHelpers.CountDigits(value));
2411 string text = string.FastAllocateString(num);
2412 fixed (char* ptr = text)
2413 {
2414 char* bufferEnd = ptr + num;
2415 bufferEnd = UInt32ToDecChars(bufferEnd, value, digits);
2416 }
2417 return text;
2418 }
static unsafe byte * UInt32ToDecChars(byte *bufferEnd, uint value, int digits)
Definition Number.cs:2360
static unsafe string UInt32ToDecStr(uint value)
Definition Number.cs:2382

References System.Buffers.Text.FormattingHelpers.CountDigits(), System.Math.Max(), System.text, System.Number.UInt32ToDecChars(), System.Number.UInt32ToDecStr(), and System.value.