| Home | Libraries | People | FAQ | More

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

Insert into the string.

###### Synopsis

    constexpr basic_static_string&
    insert(
        basic_static_string::size_type index,
        basic_static_string::size_type count,
        basic_static_string::value_type ch);

###### Description

Inserts `count` copies of `ch` at the position `index`.

###### 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

`*this`

###### Parameters

Name | Description
--- | ---
`index` | The index to insert at.
`count` | The number of characters to insert.
`ch` | The character to insert.

###### Exceptions

Type | Thrown On
--- | ---
`std::length_error` | `size() + count > max_size()`
`std::out_of_range` | `index > size()`