public override int Match(string underlying_text, int starting_index, int ending_index) { if (ending_index - starting_index < str.Length) { return(MISMATCH); } return(Patterns.matchString(str, underlying_text, starting_index, ending_index)); }
public override int Match(string underlying_text, int starting_index, int ending_index) { if (starting_index >= ending_index) { return(MISMATCH); } if (Patterns.matchString(str, underlying_text, starting_index, ending_index) == Pattern.MISMATCH) { return(1); } else { return(MISMATCH); } }