Ironically, strings include their own swap method which is much more efficient -- it takes a constant time of operation instead of copying every character. For example:
Code:
std::string a = "Alpha";
std::string b = "Beta";
a.swap(b);
std::cout << a << ' ' << b << std::endl;
This prints Beta Alpha.