this.termination = termination;
}
+ public boolean matches(String source, int index) {
+ // boundary check
+ if (source.length() < (index + startSequence.length()))
+ return false;
+
+ // match check
+ for (int i = 0; i < startSequence.length(); i++)
+ if (startSequence.charAt(i) != source.charAt(index + i))
+ return false;
+
+ return true;
+ }
+
public enum TerminationStrategy {
PRESERVE,
DROP