Knuth-Morriss-Pratt algorithm for SubString search