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

◆ AddConcatenate() [3/3]

void System.Text.RegularExpressions.RegexParser.AddConcatenate ( int pos,
int cch,
bool isReplacement )
inlineprivate

Definition at line 1841 of file RegexParser.cs.

1842 {
1843 if (cch == 0)
1844 {
1845 return;
1846 }
1847 RegexNode newChild;
1848 if (cch > 1)
1849 {
1850 string str = ((UseOptionI() && !isReplacement) ? string.Create(cch, (_pattern, _culture, pos, cch), delegate(Span<char> span, (string _pattern, CultureInfo _culture, int pos, int cch) state)
1851 {
1852 state._pattern.AsSpan(state.pos, state.cch).ToLower(span, state._culture);
1853 }) : _pattern.Substring(pos, cch));
1854 newChild = new RegexNode(12, _options, str);
1855 }
1856 else
1857 {
1858 char c = _pattern[pos];
1859 if (UseOptionI() && !isReplacement)
1860 {
1861 c = _culture.TextInfo.ToLower(c);
1862 }
1863 newChild = new RegexNode(9, _options, c);
1864 }
1866 }
void AddChild(RegexNode newChild)

References System.Text.RegularExpressions.RegexParser._concatenation, System.Text.RegularExpressions.RegexParser._culture, System.Text.RegularExpressions.RegexParser._options, System.Text.RegularExpressions.RegexParser._pattern, System.Text.RegularExpressions.RegexNode.AddChild(), System.state, System.Text.RegularExpressions.str, System.Globalization.CultureInfo.TextInfo, and System.Text.RegularExpressions.RegexParser.UseOptionI().