Namespaces
Variants
Views
Actions

std::basic_string::swap

From cppreference.com
 
 
 
std::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

[edit] Complexity

constant