Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
string::clear

Clear the contents.

Synopsis
void
clear();
Description

Erases all characters from the string. After this call, size() returns zero but capacity() is unchanged.

Complexity

Linear in size().

Remarks

All references, pointers, or iterators referring to contained elements are invalidated. Any past-the-end iterators are also invalidated.


PrevUpHomeNext