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 replace_tail

boost::algorithm::replace_tail — Replace tail algorithm.

Synopsis

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


template<typename SequenceT, typename RangeT> 
  void replace_tail(SequenceT & Input, int N, const RangeT & Format);

Description

Replace the tail of the input with the given format sequence. The tail is a suffix of a string of given size. If the sequence is shorter then required, the whole string is considered to be the tail. The input sequence is modified in-place.

Parameters:

Format

A substitute string

Input

An input string

N

Length of the tail. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted.


PrevUpHomeNext