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.

  1. T[] nu_etoh(T[] in_, Endianess endian)
  2. T[] nu_etoh(T[] in_)
  3. T nu_etoh(T in_)
  4. T nu_etoh(T in_, Endianess endian)
    @system @nogc nothrow
    T
    nu_etoh
    (
    T
    )

Parameters

in_ T

The value to potentially flip.

endian Endianess

The endianness to convert between.

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