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 find_format_copy

boost::algorithm::find_format_copy — Generic replace algorithm.

Synopsis

// In header: <boost/algorithm/string/find_format.hpp>


template<typename OutputIteratorT, typename RangeT, typename FinderT, 
         typename FormatterT> 
  OutputIteratorT 
  find_format_copy(OutputIteratorT Output, const RangeT & Input, 
                   FinderT Finder, FormatterT Formatter);
template<typename SequenceT, typename FinderT, typename FormatterT> 
  SequenceT find_format_copy(const SequenceT & Input, FinderT Finder, 
                             FormatterT Formatter);

Description

Use the Finder to search for a substring. Use the Formatter to format this substring and replace it in the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator.

Parameters:

Finder

A Finder object used to search for a match to be replaced

Formatter

A Formatter object used to format a match

Input

An input sequence

Output

An output iterator to which the result will be copied

Returns:

An output iterator pointing just after the last inserted character or a modified copy of the input

Notes:

The second variant of this function provides the strong exception-safety guarantee


PrevUpHomeNext