Share via


basic_string::insert

basic_string::insert

basic_string& insert(size_type p0, const E *s);
basic_string& insert(size_type p0, const E *s, size_type n);
basic_string& insert(size_type p0,
    const basic_string& str);
basic_string& insert(size_type p0,
    const basic_string& str, size_type pos, size_type n);
basic_string& insert(size_type p0, size_type n, E c);
iterator insert(iterator it, E c);
void insert(iterator it, const_iterator first, const_iterator last);
void insert(iterator it, size_type n, E c);

Each member function inserts, before position p0 or before the element pointed to by it in the controlled sequence, the operand sequence specified by the remaining operands. A function that returns a value returns *this.

In this implementation, if a translator does not support member template functions, the template:

template<class InIt>
    void insert(iterator it, InIt first, InIt last);

is replaced by:

void insert(iterator it, const_iterator first, const_iterator last);