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

◆ FormatNumber()

static void System.Globalization.FormatProvider.Number.FormatNumber ( ref System::Text::ValueStringBuilder sb,
ref NumberBuffer number,
int nMinDigits,
int nMaxDigits,
NumberFormatInfo info )
inlinestaticprivate

Definition at line 661 of file FormatProvider.cs.

662 {
663 string text = (number.sign ? s_negNumberFormats[info.NumberNegativePattern] : "#");
664 string text2 = text;
665 foreach (char c in text2)
666 {
667 switch (c)
668 {
669 case '#':
670 FormatFixed(ref sb, ref number, nMinDigits, nMaxDigits, info, info.NumberGroupSizes, info.NumberDecimalSeparator, info.NumberGroupSeparator);
671 break;
672 case '-':
673 sb.Append(info.NegativeSign);
674 break;
675 default:
676 sb.Append(c);
677 break;
678 }
679 }
680 }
static unsafe void FormatFixed(ref System.Text.ValueStringBuilder sb, ref NumberBuffer number, int nMinDigits, int nMaxDigits, NumberFormatInfo info, int[] groupDigits, string sDecimal, string sGroup)
static readonly string[] s_negNumberFormats

References System.Globalization.FormatProvider.Number.FormatFixed(), System.info, System.Globalization.FormatProvider.Number.s_negNumberFormats, and System.text.

Referenced by System.Globalization.FormatProvider.Number.NumberToString().