BasicString.proxySwap

Swaps the contents of this and rhs.

struct BasicString
scope pure nothrow @trusted @nogc
void
proxySwap
(
scope ref typeof(this) rhs
)

Examples

BasicString!char a = "1";
BasicString!char b = "2";

a.proxySwap(b);
assert(a == "2");
assert(b == "1");

import std.algorithm.mutation : swap;

swap(a, b);
assert(a == "1");
assert(b == "2");

Meta