...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::algorithm::knuth_morris_pratt_search — Searches the corpus for the pattern.
// In header: <boost/algorithm/searching/knuth_morris_pratt.hpp> template<typename patIter, typename corpusIter> std::pair< corpusIter, corpusIter > knuth_morris_pratt_search(corpusIter corpus_first, corpusIter corpus_last, patIter pat_first, patIter pat_last);