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

◆ UInt32ToDecStr() [1/2]

static unsafe string System.Number.UInt32ToDecStr ( uint value)
inlinestaticpackage

Definition at line 2382 of file Number.cs.

2383 {
2385 if (num == 1)
2386 {
2388 }
2389 string text = string.FastAllocateString(num);
2390 fixed (char* ptr = text)
2391 {
2392 char* ptr2 = ptr + num;
2393 do
2394 {
2395 uint num2;
2396 (value, num2) = Math.DivRem(value, 10u);
2397 *(--ptr2) = (char)(num2 + 48);
2398 }
2399 while (value != 0);
2400 }
2401 return text;
2402 }
static readonly string[] s_singleDigitStringCache
Definition Number.cs:1233

References System.Buffers.Text.FormattingHelpers.CountDigits(), System.Math.DivRem(), System.Number.s_singleDigitStringCache, System.text, and System.value.

Referenced by System.Number.FormatInt32(), System.Number.FormatUInt32(), System.Number.Int32ToDecStr(), System.Byte.ToString(), System.UInt16.ToString(), System.UInt32.ToString(), System.Byte.ToString(), System.UInt16.ToString(), System.UInt32.ToString(), and System.Number.UInt32ToDecStr().