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

◆ Format() [1/2]

string System.Xml.Xsl.Runtime.DecimalFormatter.Format ( double value)
inline

Definition at line 190 of file DecimalFormatter.cs.

191 {
193 string text;
194 if (value < 0.0 && _negFormatInfo != null)
195 {
198 }
199 else
200 {
203 }
204 string text2 = value.ToString(text, numberFormatInfo);
205 if (_zeroDigit != '0')
206 {
208 int num = _zeroDigit - 48;
209 for (int i = 0; i < text2.Length; i++)
210 {
211 char c = text2[i];
212 switch (c)
213 {
214 case '0':
215 case '1':
216 case '2':
217 case '3':
218 case '4':
219 case '5':
220 case '6':
221 case '7':
222 case '8':
223 case '9':
224 c = (char)(c + (ushort)num);
225 break;
226 case '\a':
227 c = text2[++i];
228 break;
229 }
230 stringBuilder.Append(c);
231 }
232 text2 = stringBuilder.ToString();
233 }
234 return text2;
235 }
readonly NumberFormatInfo _negFormatInfo
readonly NumberFormatInfo _posFormatInfo

References System.Xml.Xsl.Runtime.DecimalFormatter._negFormat, System.Xml.Xsl.Runtime.DecimalFormatter._negFormatInfo, System.Xml.Xsl.Runtime.DecimalFormatter._posFormat, System.Xml.Xsl.Runtime.DecimalFormatter._posFormatInfo, System.Xml.Xsl.Runtime.DecimalFormatter._zeroDigit, System.Xml.Dictionary, System.text, and System.value.

Referenced by System.Xml.Xsl.XsltOld.XsltCompileContext.FuncFormatNumber.Invoke().