boost::algorithm::replace_range — Replace range algorithm.
// In header: <boost/algorithm/string/replace.hpp> template<typename SequenceT, typename RangeT> ( Input, SearchRange, Format);
Replace the given range in the input string. The input sequence is modified in-place.
Parameters:
Format
A substitute string
Input
An input string
SearchRange
A range in the input to be substituted