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

◆ AddDateWords()

int System.Globalization.DateTimeFormatInfoScanner.AddDateWords ( string pattern,
int index,
string formatPostfix )
inlinepackage

Definition at line 106 of file DateTimeFormatInfoScanner.cs.

107 {
108 int num = SkipWhiteSpacesAndNonLetter(pattern, index);
109 if (num != index && formatPostfix != null)
110 {
111 formatPostfix = null;
112 }
113 index = num;
115 while (index < pattern.Length)
116 {
117 char c = pattern[index];
118 switch (c)
119 {
120 case '\'':
121 break;
122 case '\\':
123 index++;
124 if (index < pattern.Length)
125 {
126 stringBuilder.Append(pattern[index]);
127 index++;
128 }
129 continue;
130 default:
131 if (char.IsWhiteSpace(c))
132 {
134 if (formatPostfix != null)
135 {
136 formatPostfix = null;
137 }
138 stringBuilder.Length = 0;
139 index++;
140 }
141 else
142 {
143 stringBuilder.Append(c);
144 index++;
145 }
146 continue;
147 }
149 index++;
150 break;
151 }
152 return index;
153 }
void AddDateWordOrPostfix(string formatPostfix, string str)
static int SkipWhiteSpacesAndNonLetter(string pattern, int currentIndex)

References System.Globalization.DateTimeFormatInfoScanner.AddDateWordOrPostfix(), System.index, and System.Globalization.DateTimeFormatInfoScanner.SkipWhiteSpacesAndNonLetter().

Referenced by System.Globalization.DateTimeFormatInfoScanner.ScanDateWord().