swapAt

fnvoid swapAt(R)(auto ref R r, size_t i1, size_t i2)

Swaps two elements in-place of a range r, specified by their indices i1 and i2.

Parameters

ra range with swappable elements
i1first index
i2second index