Byte Order Utilities

Examine and manage the byte order of numbers communicated through network channels.

Topics

Functions

func NSHostByteOrder() -> Int

Returns the endian format.

func NSSwapBigIntToHost(UInt32) -> UInt32

Swaps the bytes of a number.

func NSSwapBigLongToHost(UInt) -> UInt

Swaps the bytes of a number.

func NSSwapHostIntToBig(UInt32) -> UInt32

Swaps the bytes of a number.

func NSSwapHostLongToBig(UInt) -> UInt

Swaps the bytes of a number.

func NSSwapHostLongToLittle(UInt) -> UInt

Swaps the bytes of a number.

func NSSwapInt(UInt32) -> UInt32

Swaps the bytes of a number.

func NSSwapLittleLongToHost(UInt) -> UInt

Swaps the bytes of a number.

func NSSwapLong(UInt) -> UInt

Swaps the bytes of a number.

func NSSwapLongLong(UInt64) -> UInt64

Swaps the bytes of a number.

func NSSwapShort(UInt16) -> UInt16

Swaps the bytes of a number.

Constants

struct NSSwappedDouble

Opaque structure containing endian-independent double value.

struct NSSwappedFloat

Opaque type containing an endian-independent float value.

Byte Order

Recognize constants that specify a byte-order format.