Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template knuth_morris_pratt_search

boost::algorithm::knuth_morris_pratt_search — Searches the corpus for the pattern.

Synopsis

// In header: <boost/algorithm/searching/knuth_morris_pratt.hpp>


template<typename patIter, typename corpusIter> 
  corpusIter knuth_morris_pratt_search(corpusIter corpus_first, 
                                       corpusIter corpus_last, 
                                       patIter pat_first, patIter pat_last);

Description

Parameters:

corpus_first

The start of the data to search (Random Access Iterator)

corpus_last

One past the end of the data to search

pat_first

The start of the pattern to search for (Random Access Iterator)

pat_last

One past the end of the data to search for


PrevUpHomeNext