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

◆ VerifyValidPunctuation()

static bool System.DateTimeParse.VerifyValidPunctuation ( ref __DTString str)
inlinestaticprivate

Definition at line 1221 of file DateTimeParse.cs.

1222 {
1223 switch (str.Value[str.Index])
1224 {
1225 case '#':
1226 {
1227 bool flag = false;
1228 bool flag2 = false;
1229 for (int j = 0; j < str.Length; j++)
1230 {
1231 char c = str.Value[j];
1232 switch (c)
1233 {
1234 case '#':
1235 if (flag)
1236 {
1237 if (flag2)
1238 {
1239 return false;
1240 }
1241 flag2 = true;
1242 }
1243 else
1244 {
1245 flag = true;
1246 }
1247 break;
1248 case '\0':
1249 if (!flag2)
1250 {
1251 return false;
1252 }
1253 break;
1254 default:
1255 if (!char.IsWhiteSpace(c) && (!flag || flag2))
1256 {
1257 return false;
1258 }
1259 break;
1260 }
1261 }
1262 if (!flag2)
1263 {
1264 return false;
1265 }
1266 str.GetNext();
1267 return true;
1268 }
1269 case '\0':
1270 {
1271 for (int i = str.Index; i < str.Length; i++)
1272 {
1273 if (str.Value[i] != 0)
1274 {
1275 return false;
1276 }
1277 }
1278 str.Index = str.Length;
1279 return true;
1280 }
1281 default:
1282 return false;
1283 }
1284 }

References System.str.

Referenced by System.DateTimeParse.Lex(), and System.DateTimeParse.ParseISO8601().