MatchLength() private method

private MatchLength ( int cap ) : int
cap int
return int
Esempio n. 1
0
 /// <summary>
 /// Call out to runmatch to get around visibility issues
 /// </summary>
 protected int MatchLength(int cap)
 {
     return(runmatch.MatchLength(cap));
 }
Esempio n. 2
0
 /// <summary>
 /// Transfers a Capture to a Match
 /// </summary>
 /// <param name="match"></param>
 /// <param name="capnum"></param>
 /// <param name="uncapnum"></param>
 /// <param name="start"></param>
 /// <param name="end"></param>
 internal void TransferCapture(Match match, int capnum, int uncapnum, int start, int end)
 {
     if (end < start)
     {
         int numx = end;
         end = start;
         start = numx;
     }
     int num = match.MatchIndex(uncapnum);
     int num2 = match.MatchLength(uncapnum);
     if (start >= num2)
     {
         end = start;
         start = num2;
     }
     else if (end <= num)
     {
         start = num;
     }
     else
     {
         if (end > num2)
         {
             end = num2;
         }
         if (num > start)
         {
             start = num;
         }
     }
     //this.Crawl(uncapnum);
     match.BalanceMatch(uncapnum);
     if (capnum != -1)
     {
         //this.Crawl(capnum);
         match.AddMatch(capnum, start, end - start);
     }
 }