2 // This software is now distributed according to
\r
3 // the Lesser Gnu Public License. Please see
\r
4 // http://www.gnu.org/copyleft/lesser.txt for
\r
6 // -- Happy Computing!
\r
8 package com.stevesoft.pat;
\r
10 /** This is the same as Skip, except it needs a minimum
\r
11 of two characters in the initializing String.
\r
12 @see com.stevesoft.pat.Skip
\r
13 @see com.stevesoft.pat.SkipBMH
\r
15 public class Skip2 extends Skip {
\r
17 public Skip2(String s,boolean ign,int offset) {
\r
18 super(s,ign,offset);
\r
26 public int find(StringLike s,int start,int end) {
\r
27 if(start > end) return -1;
\r
29 int vend = min(s.length()-2,end+offset);
\r
30 for(int i=start;i<=vend;i++)
\r
31 if(0 == (s.charAt(i)&mask) && 0 == (s.charAt(i+1)&mask1)) {
\r
32 //if(m1||s.regionMatches(ign,i,src,0,src.length()) )
\r
33 if(m1||CaseMgr.regionMatches(s,ign,i,src,0,src.length()) )
\r