nu_etoh

Converts bytes between system and the given endianness.

This essentially flips the byte-order within the type if the given endianness does not match the system endiannes.

Parameters

in_ T

The value to potentially flip.

Return Value

Type: T

If endian does not match NATIVE_ENDIAN, returns the input with the byte order reversed, otherwise returns the original value.

Meta