iterator erase(iterator first, iterator last);
iterator erase(iterator it);
basic_string& erase(size_type p0 = 0, size_type n = npos);
The first member function removes the elements of the controlled sequence in the range [first, last)
. The second
member function removes the element of the controlled sequence pointed to by it
. Both return an iterator that
designates the first element remaining beyond any elements removed, or end
()
if no such element exists.
The third member function removes up to n
elements of the controlled sequence beginning at position p0
, then returns
*this
.