Function BasicString.proxySwap
Swaps the contents of this
and rhs
.
void proxySwap
(
scope ref typeof(this) rhs
) pure nothrow @nogc scope @trusted;
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");