swapByteOrder

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

Swap byte order of items in an array in place.

Parameters

TItem type. Must be either 2 or 4 bytes long.
arrayBuffer with values to fix byte order of.