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

◆ TransferCapture()

void System.Text.RegularExpressions.RegexRunner.TransferCapture ( int capnum,
int uncapnum,
int start,
int end )
inlineprotected

Definition at line 374 of file RegexRunner.cs.

375 {
376 if (end < start)
377 {
378 int num = end;
379 end = start;
380 start = num;
381 }
382 int num2 = MatchIndex(uncapnum);
383 int num3 = num2 + MatchLength(uncapnum);
384 if (start >= num3)
385 {
386 end = start;
387 start = num3;
388 }
389 else if (end <= num2)
390 {
391 start = num2;
392 }
393 else
394 {
395 if (end > num3)
396 {
397 end = num3;
398 }
399 if (num2 > start)
400 {
401 start = num2;
402 }
403 }
404 Crawl(uncapnum);
405 runmatch.BalanceMatch(uncapnum);
406 if (capnum != -1)
407 {
408 Crawl(capnum);
409 runmatch.AddMatch(capnum, start, end - start);
410 }
411 }
void AddMatch(int cap, int start, int len)
Definition Match.cs:114

References System.Text.RegularExpressions.Match.AddMatch(), System.Text.RegularExpressions.Match.BalanceMatch(), System.Text.RegularExpressions.RegexRunner.Crawl(), System.Text.RegularExpressions.RegexRunner.MatchIndex(), System.Text.RegularExpressions.RegexRunner.MatchLength(), System.Text.RegularExpressions.RegexRunner.runmatch, and System.start.

Referenced by System.Text.RegularExpressions.RegexInterpreter.Go().