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

◆ Int32ToHexStr()

static unsafe string System.Number.Int32ToHexStr ( int value,
char hexBase,
int digits )
inlinestaticprivate

Definition at line 2298 of file Number.cs.

2299 {
2300 if (digits < 1)
2301 {
2302 digits = 1;
2303 }
2304 int num = Math.Max(digits, FormattingHelpers.CountHexDigits((uint)value));
2305 string text = string.FastAllocateString(num);
2306 fixed (char* ptr = text)
2307 {
2308 char* ptr2 = Int32ToHexChars(ptr + num, (uint)value, hexBase, digits);
2309 }
2310 return text;
2311 }
static unsafe char * Int32ToHexChars(char *buffer, uint value, int hexBase, int digits)
Definition Number.cs:2333

References System.Buffers.Text.FormattingHelpers.CountHexDigits(), System.Number.Int32ToHexChars(), System.Math.Max(), System.text, and System.value.

Referenced by System.Number.FormatInt32(), and System.Number.FormatUInt32().