swapByteOrder

Swap byte order of items in an array in place.

@trusted @nogc pure nothrow
void
swapByteOrder
(
T
)
(
T[] array
)
if (
T.sizeof == 2 ||
T.sizeof == 4
)

Parameters

T

Item type. Must be either 2 or 4 bytes long.

array T[]

Buffer with values to fix byte order of.

Meta