So I run that and I get a skip of 2.

So this makes sense, because in this case, we're going to have to move our p

along until we find a T that lines up with the mismatch of T in our text.

So once we move it two indices along,

that first index of p will match up with the text, so we have a skip of 2.

>> Mm-hm.

That's the amount we're going to shift the pattern along

as a result of the bad_character_rule.

>> Yep.

So now let's do something similar, but for the good_suffix rule.

So I'm going to keep the same t, but I'm going to change our p here to be this.

So the last three characters of P, in this case, will match against our text.

So I have to create my Boyer-Moore object and

then I can call good_suffix_rule.

And in this case, I only had to pass in the index where the mismatch occurs,

which in this case is 0, because comparing backwards from the end,

the last base matches.

So do the two after that, and then the base index 0 in p

is the first one we see that mismatch is with T.

So I do that, I get a skip of 3.

So in this case, we have to move our pattern along until

a prefix of p matches a suffix of this part of t.

And in this case you can see that it's going to happen when we moved p along

three bases, and

the first A and P is going to match against that A and T right there.