Mismatch

pair<InputIterator1, InputIterator2> mismatch (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) Function
pair<InputIterator1, InputIterator2> mismatch (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate binary_pred); Function

template 
pair
    mismatch(InputIterator1 first1, InputIterator1 last1,
             InputIterator2 first2);

template 
pair
    mismatch(InputIterator1 first1, InputIterator1 last1,
             InputIterator2 first2, BinaryPredicate binary_pred);

mismatch returns a pair of iterators i and j such that j == first2 + (i - first1) and i is the first iterator in the range [first1, last1) for which the following corresponding conditions hold: !(*i == *(first2 + (i - first1))), binary_pred(*i, *(first2 + (i - first1))) == false. If such an iterator i is not found, a pair of last1 and first2 + (last1 - first1) is returned. At most last1 - first1 applications of the corresponding predicate are done.