| Home | Libraries | People | FAQ | More

##### basic_static_string::insert (6 of 11 overloads)

Insert into the string.

###### Synopsis

    iterator
    insert(
        const_iterator pos,
        value_type ch);

###### Description

Inserts the character `ch` before the character pointed by `pos`.

###### Precondition

`pos`shall be vaild within `{data(), data() + size()}`

###### Exception Safety

Strong guarantee.

###### Remarks

All references, pointers, or iterators referring to contained elements are invalidated. Any past-the-end iterators are also invalidated.

###### Return Value

An iterator which refers to the first inserted character or `pos` if no characters were inserted

###### Parameters

Name | Description
--- | ---
`pos` | The index to insert at.
`ch` | The character to insert.

###### Exceptions

Type | Thrown On
--- | ---
`std::length_error` | `size() + 1 > max_size()`