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

◆ FormatBigInteger()

static unsafe void System.Globalization.FormatProvider.FormatBigInteger ( ref System::Text::ValueStringBuilder sb,
int precision,
int scale,
bool sign,
ReadOnlySpan< char > format,
NumberFormatInfo numberFormatInfo,
char[] digits,
int startIndex )
inlinestaticpackage

Definition at line 1208 of file FormatProvider.cs.

1209 {
1210 fixed (char* ptr = digits)
1211 {
1212 Number.NumberBuffer number = default(Number.NumberBuffer);
1213 number.overrideDigits = ptr + startIndex;
1214 number.precision = precision;
1215 number.scale = scale;
1216 number.sign = sign;
1217 int digits2;
1218 char c = Number.ParseFormatSpecifier(format, out digits2);
1219 if (c != 0)
1220 {
1221 Number.NumberToString(ref sb, ref number, c, digits2, numberFormatInfo, isDecimal: false);
1222 }
1223 else
1224 {
1225 Number.NumberToStringFormat(ref sb, ref number, format, numberFormatInfo);
1226 }
1227 }
1228 }

References System.format, System.Globalization.FormatProvider.Number.NumberToString(), System.Globalization.FormatProvider.Number.NumberToStringFormat(), System.Globalization.FormatProvider.Number.ParseFormatSpecifier(), and System.startIndex.

Referenced by System.Numerics.BigNumber.FormatBigInteger().