knuth-morris-pratt string-searching algorithm www.softpanorama.org