Clear
clear()
Deletes characters, sets size to 0.
// userText is "Help me!"
userText.clear(); // Clears string
userText.size(); // Returns 0
userText.at(0); // Generates exception
Deletes characters, sets size to 0.
// userText is "Help me!"
userText.clear(); // Clears string
userText.size(); // Returns 0
userText.at(0); // Generates exception