An instance of BoyerMooreFinder that can be used with find() to invoke the Boyer-Moore matching algorithm for finding of needle in a given haystack.
auto bmFinder = boyerMooreFinder("TG"); string r = "TAGTGCCTGA"; // search for the first match in the haystack r r = bmFinder.beFound(r); assert(r == "TGCCTGA"); // continue search in haystack r = bmFinder.beFound(r[2 .. $]); assert(r == "TGA");
Sets up Boyer-Moore matching for use with find below. By default, elements are compared for equality.
BoyerMooreFinder allocates GC memory.