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

◆ WriteFourDecimalDigits()

static void System.Buffers.Text.FormattingHelpers.WriteFourDecimalDigits ( uint value,
Span< byte > buffer,
int startingIndex = 0 )
inlinestatic

Definition at line 147 of file FormattingHelpers.cs.

148 {
149 uint num = 48 + value;
150 value /= 10;
151 buffer[startingIndex + 3] = (byte)(num - value * 10);
152 num = 48 + value;
153 value /= 10;
154 buffer[startingIndex + 2] = (byte)(num - value * 10);
155 num = 48 + value;
156 value /= 10;
157 buffer[startingIndex + 1] = (byte)(num - value * 10);
158 buffer[startingIndex] = (byte)(48 + value);
159 }

References System.buffer, and System.value.

Referenced by System.Buffers.Text.Utf8Formatter.TryFormatDateTimeG(), System.Buffers.Text.Utf8Formatter.TryFormatDateTimeL(), System.Buffers.Text.Utf8Formatter.TryFormatDateTimeO(), and System.Buffers.Text.Utf8Formatter.TryFormatDateTimeR().