Standard C++ Library Reference ISO/IEC (VERSION3)

basic_string& insert(size_type off,
size_type count, value_type ch);
iterator insert(iterator where,
value_type ch = value_type());
template<class InIt>
void insert(iterator where, InIt first, InIt last);
void insert(iterator where, size_type count, value_type ch);
The member functions each insert, before position off or before the element pointed to by
where in the controlled sequence, the operand sequence specified by the remaining operands. A
function that returns a value returns *this. If InIt is an integer type in the template member
function, the operand sequence first, last behaves the same as (size_type)first,
(value_type)last.
In this implementation, if a translator does not support member template functions, the template:
template<class InIt>
void insert(iterator where, InIt first, InIt last);
is replaced by:
void insert(iterator where,
const_pointer first, const_pointer last);
basic_string::iterator
typedef T0 iterator;
The type describes an object that can serve as a random-access iterator for the controlled sequence.
It is described here as a synonym for the implementation-defined type T0.
basic_string::length
size_type length() const;
The member function returns the length of the controlled sequence (same as size()).
basic_string::max_size
size_type max_size() const;
The member function returns the length of the longest sequence that the object can control.
basic_string::npos
static const size_type npos = -1;
The constant is the largest representable value of type size_type. It is assuredly larger than
max_size(), hence it serves as either a very large value or as a special code.