Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
string::erase (2 of 3 overloads)

Erase a character from the string.

Synopsis
string::iterator
erase(
    string::const_iterator pos);
Description

Erases the character at pos.

Precondition
pos >= data() && pos <= 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 referring to character immediately following the erased character, or end() if one does not exist.

Parameters

Name

Description

pos

An iterator referring to the character to erase.


PrevUpHomeNext