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

◆ ParseFractionExact()

static bool System.DateTimeParse.ParseFractionExact ( ref __DTString str,
int maxDigitLen,
ref double result )
inlinestaticprivate

Definition at line 2745 of file DateTimeParse.cs.

2746 {
2747 if (!str.GetNextDigit())
2748 {
2749 str.Index--;
2750 return false;
2751 }
2752 result = str.GetDigit();
2753 int i;
2754 for (i = 1; i < maxDigitLen; i++)
2755 {
2756 if (!str.GetNextDigit())
2757 {
2758 str.Index--;
2759 break;
2760 }
2761 result = result * 10.0 + (double)str.GetDigit();
2762 }
2763 result /= TimeSpanParse.Pow10(i);
2764 return i == maxDigitLen;
2765 }

References System.Globalization.TimeSpanParse.Pow10(), and System.str.

Referenced by System.DateTimeParse.ParseByFormat().