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

◆ AddMatch()

void System.Text.RegularExpressions.Match.AddMatch ( int cap,
int start,
int len )
inlinepackageinherited

Definition at line 114 of file Match.cs.

115 {
116 int[][] matches = _matches;
117 if (matches[cap] == null)
118 {
119 matches[cap] = new int[2];
120 }
121 int[][] matches2 = _matches;
122 int[] matchcount = _matchcount;
123 int num = matchcount[cap];
124 if (num * 2 + 2 > matches2[cap].Length)
125 {
126 int[] array = matches2[cap];
127 int[] array2 = new int[num * 8];
128 for (int i = 0; i < num * 2; i++)
129 {
130 array2[i] = array[i];
131 }
132 matches2[cap] = array2;
133 }
134 matches2[cap][num * 2] = start;
135 matches2[cap][num * 2 + 1] = len;
136 matchcount[cap] = num + 1;
137 }

References System.Text.RegularExpressions.Match._matchcount, System.Text.RegularExpressions.Match._matches, System.Text.RegularExpressions.array, System.Text.RegularExpressions.i, System.len, System.Text.RegularExpressions.Capture.Length, and System.start.

Referenced by System.Text.RegularExpressions.Match.BalanceMatch(), System.Text.RegularExpressions.RegexRunner.Capture(), and System.Text.RegularExpressions.RegexRunner.TransferCapture().