| Home | Libraries | People | FAQ | More

##### basic_static_string::erase (1 of 3 overloads)

Erase from the string.

###### Synopsis

    constexpr basic_static_string&
    erase(
        basic_static_string::size_type index = 0,
        basic_static_string::size_type count = basic_static_string::npos);

###### Description

Erases `num` characters from the string, starting at `index`. `num` is determined as the smaller of `count` and `size() - 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 erase at. The default argument for this parameter is `0`.
`count` | The number of characters to erase. The default argument for this parameter is `npos`.

###### Exceptions

Type | Thrown On
--- | ---
`std::out_of_range` | `index > size()`