Replace a substring with characters from a range.
Synopsis
Declared in <bslstl_string.h>
template<class RANGE>
basic_string&
replace_with_range(
const_iterator first,
const_iterator last,
RANGE&& range);
Description
Replace the substring in the range starting at the specified first position and ending right before the specified last position with the characters from the specified range. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last are both within the range [cbegin() .. cend()]. Note that range must meet the requirements of an input range and the values from range must have a type matching or convertible to template parameter) CHAR_TYPE.
Return Value
reference providing modifiable access to this string
Parameters
Name |
Description |
range |
input range of characters |
first |
beginning of the range (inclusive) |
last |
end of the range (exclusive) |
Created with MrDocs