NAME
u32.h - 32bit unsigned integers
SYNOPSIS
#include <limb/u32.h>
DESCRIPTION
This header defines functions allowing to work with 32bit unsigned integers.
Constants
The following constants are defined :
U32_FMT
Maximum length for a byte array that can hold an u32 value in decimal representation, plus a NUL-terminating byte
U32_FMTG
Same as U32_FMT but with thousand-separators
U32_BFMT
Same as U32_FMT but for binary
U32_OFMT
Same as U32_FMT but for octal
U32_XFMT
Same as U32_FMT but for hexadecimal
Functions
The following functions/macros are defined :
Convert a u32 number to big endian.
Convert a u32 number to little endian.
Similar to u32_be(3) but takes a pointer.
Similar to u32_le(3) but takes a pointer.
Similar to u32p_be(3) but for an array of pointers.
Similar to u32p_le(3) but for an array of pointers.
Store a u32 number encoded in little endian.
Read a u32 number encoded in little endian.
Store a u32 number encoded in big endian.
Read a u32 number encoded in big endian.
Write a u32 number as decimal into a byte array.
Write a u32 number as decimal, using coma as thousand separator, into a byte array.
Similar to u32_fmt(3) but as binary.
Similar to u32_fmt(3) but as octal.
Similar to u32_fmt(3) but as hexadecimal.
Similar to u32_fmt(3) but filling with zeroes if less than given size.
Similar to u32_fmtg(3) but filling with zeroes if less than given size.
Similar to u32_bfmt(3) but filling with zeroes if less than given size.
Similar to u32_ofmt(3) but filling with zeroes if less than given size.
Similar to u32_xfmt(3) but filling with zeroes if less than given size.
Read a u32 value from a byte array.
Similar to u32_scan(3) but for binary value.
Similar to u32_scan(3) but for octal value.
Similar to u32_scan(3) but for hexadecimal value.
Similar to u32_scan(3) but expects a NUL-terminated string.
Similar to u32_bscan(3) but expects a NUL-terminated string.
Similar to u32_oscan(3) but expects a NUL-terminated string.
Similar to u32_xscan(3) but expects a NUL-terminated string.