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

◆ TryParseDigits()

static string System.Xml.Schema.XsdDuration.TryParseDigits ( string s,
ref int offset,
bool eatDigits,
out int result,
out int numDigits )
inlinestaticprivate

Definition at line 577 of file XsdDuration.cs.

578 {
579 int num = offset;
580 int length = s.Length;
581 result = 0;
582 numDigits = 0;
583 while (offset < length && s[offset] >= '0' && s[offset] <= '9')
584 {
585 int num2 = s[offset] - 48;
586 if (result > (int.MaxValue - num2) / 10)
587 {
588 if (!eatDigits)
589 {
591 }
592 numDigits = offset - num;
593 while (offset < length && s[offset] >= '0' && s[offset] <= '9')
594 {
595 offset++;
596 }
597 return null;
598 }
599 result = result * 10 + num2;
600 offset++;
601 }
602 numDigits = offset - num;
603 return null;
604 }
static string XmlConvert_Overflow
Definition SR.cs:372
Definition SR.cs:7

References System.Xml.Dictionary, System.length, System.offset, System.s, and System.SR.XmlConvert_Overflow.

Referenced by System.Xml.Schema.XsdDuration.TryParse().