match method
Locate the best instance of pattern
in text
near loc
.
Returns -1 if no match found.
text
is the text to search.pattern
is the pattern to search for.loc
is the location to search around.
Returns the best match index or -1.
Implementation
int match(String text, String pattern, int loc) {
return m.match(text, pattern, loc, threshold: matchThreshold,
distance: matchDistance);
}