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

◆ ParseFormat()

static List< FormatInfo > System.Xml.Xsl.XsltOld.NumberAction.ParseFormat ( string formatString)
inlinestaticprivate

Definition at line 682 of file NumberAction.cs.

683 {
684 if (formatString == null || formatString.Length == 0)
685 {
686 return null;
687 }
688 int num = 0;
689 bool flag = CharUtil.IsAlphaNumeric(formatString[num]);
691 int num2 = 0;
692 if (flag)
693 {
694 list.Add(null);
695 }
696 while (num <= formatString.Length)
697 {
698 bool flag2 = ((num < formatString.Length) ? CharUtil.IsAlphaNumeric(formatString[num]) : (!flag));
699 if (flag != flag2)
700 {
701 FormatInfo formatInfo = new FormatInfo();
702 if (flag)
703 {
704 mapFormatToken(formatString, num2, num - num2, out formatInfo.numSequence, out formatInfo.length);
705 }
706 else
707 {
709 formatInfo.formatString = formatString.Substring(num2, num - num2);
710 }
711 num2 = num;
712 num++;
714 flag = flag2;
715 }
716 else
717 {
718 num++;
719 }
720 }
721 return list;
722 }
void Add(TKey key, TValue value)
static bool IsAlphaNumeric(char ch)
Definition CharUtil.cs:7
static void mapFormatToken(string wsToken, int startLen, int tokLen, out NumberingSequence seq, out int pminlen)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Dictionary, System.Xml.Xsl.Runtime.CharUtil.IsAlphaNumeric(), System.list, and System.Xml.Xsl.XsltOld.NumberAction.mapFormatToken().

Referenced by System.Xml.Xsl.XsltOld.NumberAction.Compile(), and System.Xml.Xsl.XsltOld.NumberAction.Execute().