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

◆ ParseExactDigits() [1/2]

static bool System.Globalization.TimeSpanParse.ParseExactDigits ( ref TimeSpanTokenizer tokenizer,
int minDigitLength,
int maxDigitLength,
out int zeroes,
out int result )
inlinestaticprivate

Definition at line 1376 of file TimeSpanParse.cs.

1377 {
1378 int num = 0;
1379 int num2 = 0;
1380 int i;
1381 for (i = 0; i < maxDigitLength; i++)
1382 {
1383 char nextChar = tokenizer.NextChar;
1384 if (nextChar < '0' || nextChar > '9')
1385 {
1386 tokenizer.BackOne();
1387 break;
1388 }
1389 num = num * 10 + (nextChar - 48);
1390 if (num == 0)
1391 {
1392 num2++;
1393 }
1394 }
1395 zeroes = num2;
1396 result = num;
1397 return i >= minDigitLength;
1398 }