Insert characters into this string.
Synopsis
Declared in <bslstl_string.h>
iterator
insert(
const_iterator position,
std::initializer_list<CHAR_TYPE> values);
Description
Insert at the specified position in this string each CHAR_TYPE object in the specified values initializer list, and return an iterator to the first newly‐inserted character. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, and move assignment operator of CHAR_TYPE), *this is unaffected. The behavior is undefined unless position is an iterator in the range [begin() .. end()] (both endpoints included).
Return Value
iterator referring to the first inserted character
Parameters
Name |
Description |
position |
starting index |
values |
initializer list of characters |
Created with MrDocs