Modifying Operations

C++ gives us a variety of tools to modify and manipulate strings.

We'll cover the following...

Strings have many operations to modify them. str.assign assigns a new string to the string str. With str.swap you can swap two strings. To remove a character from a string use str.pop_back or str.erase. In contrary str.clear or str.erase deletes the whole string. To append new characters to a string use +=, std.append or str.push_back. You can use str.insert to insert new ...