std::basic_string::swap
From cppreference.com
                    
                                        
                    < cpp | string | basic string
                    
                                                            
                    |   void swap( basic_string& other );  | 
||
Exchanges the contents of the string with those of other. All iterators and references remain valid.
Contents | 
[edit] Parameters
| other | - | string to exchange the contents with | 
[edit] Return value
(none)
[edit] Example
| This section is incomplete Reason: no example  | 
[edit] Complexity
constant