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 to view this page for the latest version.
PrevUpHomeNext

Function template ifind_all

boost::algorithm::ifind_all — Find all algorithm ( case insensitive ).

Synopsis

template<typename SequenceSequenceT, typename Range1T, typename Range2T> 
  SequenceSequenceT & 
  ifind_all(SequenceSequenceT & Result, Range1T & Input, 
            const Range2T & Search, const std::locale & Loc = std::locale());

Description

This algorithm finds all occurrences of the search string in the input. Each part is copied and added as a new element to the output container. Thus the result container must be able to hold copies of the matches (in a compatible structure like std::string) or a reference to it (e.g. using the iterator range class). Examples of such a container are std::vector<std::string> or std::list<boost::iterator_range<std::string::iterator>>

Searching is case insensitive.

Parameters:
Input

A container which will be searched.

Loc

A locale used for case insensitive comparison

Result

A container that can hold copies of references to the substrings

Search

A substring to be searched for.

Returns:

A reference the result

Notes:

Prior content of the result will be overwritten.

This function provides the strong exception-safety guarantee

Copyright © 2002-2004 Pavol Droba

PrevUpHomeNext