Boyer-moore algorithm works. The code is hackish and needs to be fixed, also it should be tested against other algorithms to insure it actually works.