Table of Contents Previous topic Next topic
C++ COMPILER LIBRARY FUNCTIONS->String Class Functions->Member Functions->erase
string& erase(size_t pos = 0, size_t n = npos)
Erase the characters starting at position pos. The number of characters erased is the smaller of n and size() pos.
Returns a reference to the string from which the data has been erase.
iterator erase(iterator p)
Erase the character at iterator position p.
Returns an iterator which refers to the element immediately following p prior to erasure or end() in no such element exists.
iterator erase(iterator first, iterator last)
Erase the characters in the range first to last.
Returns an iterator which refers to the element pointed to by last prior to erasure.