Implementation of Boyer-Moore-Horspool string searching alogorithm in AS3