| Home | Libraries | People | FAQ | More

## 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>
      std::pair< 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