Instance Methodswift 6.1.2Swift

swapAt(_:_:)

Exchanges the byte values at the specified indices in this buffer’s memory.

func swapAt(_ i: Int, _ j: Int)

Parameters

i

The index of the first byte to swap.

j

The index of the second byte to swap.

Both parameters must be valid indices of the buffer, and not equal to endIndex. Passing the same index as both i and j has no effect.