private int FindAt(int startIndex) { matchResult.Reset(); matchResult.SetMode(Matcher.MODE_FIND); matchResult.SetStartIndex(startIndex); int foundIndex = start.Find(startIndex, str0, matchResult); if (foundIndex == -1) { matchResult.hitEnd = true; } return(foundIndex); }
/// @com.intel.drl.spec_ref public Matcher UsePattern(Pattern pat_0) { if (pat_0 == null) { throw new ArgumentException("regex.1B"); } int startIndex = matchResult.GetPreviousMatchEnd(); int mode = matchResult.Mode(); this.pat = pat_0; this.start = pat_0.start; matchResult = new MatchResultImpl(this.str0, leftBound, rightBound, pat_0.GroupCount(), pat_0.CompCount(), pat_0.ConsCount()); matchResult.SetStartIndex(startIndex); matchResult.SetMode(mode); return(this); }