| Home | Libraries | People | FAQ | More

## Function template replace_head

boost::algorithm::replace_head — Replace head algorithm.

## Synopsis

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

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

## Description

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

Parameters: |
`Format` | A substitute string
`Input` | An input string
`N` | Length of the head. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted.