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

◆ IndexOfTimePart()

static int System.Globalization.CultureData.IndexOfTimePart ( string format,
int startIndex,
string timeParts )
inlinestaticprivate

Definition at line 1670 of file CultureData.cs.

1671 {
1672 bool flag = false;
1673 for (int i = startIndex; i < format.Length; i++)
1674 {
1675 if (!flag && timeParts.Contains(format[i]))
1676 {
1677 return i;
1678 }
1679 switch (format[i])
1680 {
1681 case '\\':
1682 if (i + 1 < format.Length)
1683 {
1684 i++;
1685 char c = format[i];
1686 if (c != '\'' && c != '\\')
1687 {
1688 i--;
1689 }
1690 }
1691 break;
1692 case '\'':
1693 flag = !flag;
1694 break;
1695 }
1696 }
1697 return -1;
1698 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)

References System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), System.format, and System.startIndex.

Referenced by System.Globalization.CultureData.GetSeparator().