std::basic_string::swap

From Cppreference

Jump to: navigation, search
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