...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
// In header: <boost/algorithm/searching/knuth_morris_pratt.hpp> template<typename patIter> class knuth_morris_pratt { public: // construct/copy/destruct knuth_morris_pratt(patIter, patIter); ~knuth_morris_pratt(); // public member functions template<typename corpusIter> std::pair< corpusIter, corpusIter > operator()(corpusIter, corpusIter) const; template<typename Range> std::pair< typename boost::range_iterator< Range >::type, typename boost::range_iterator< Range >::type > operator()(Range &) const; };