2 // This software is now distributed according to
3 // the Lesser Gnu Public License. Please see
4 // http://www.gnu.org/copyleft/lesser.txt for
8 package com.stevesoft.pat;
11 * This is the same as Skip, except it needs a minimum of two characters in the
12 * initializing String.
14 * @see com.stevesoft.pat.Skip
15 * @see com.stevesoft.pat.SkipBMH
17 public class Skip2 extends Skip
21 public Skip2(String s, boolean ign, int offset)
23 super(s, ign, offset);
36 public int find(StringLike s, int start, int end)
43 int vend = min(s.length() - 2, end + offset);
44 for (int i = start; i <= vend; i++)
46 if (0 == (s.charAt(i) & mask) && 0 == (s.charAt(i + 1) & mask1))
48 // if(m1||s.regionMatches(ign,i,src,0,src.length()) )
49 if (m1 || CaseMgr.regionMatches(s, ign, i, src, 0, src.length()))