% limb manual
% u64.h(0)
% limb 0.1.0
% 2023-07-24
# NAME
u64.h - 64bit unsigned integers
# SYNOPSIS
#include <limb/u64.h>
# DESCRIPTION
This header defines functions allowing to work with 64bit unsigned integers.
## Constants
The following constants are defined :
: *U64_FMT*
:: Maximum length for a byte array that can hold an u64 value in decimal
:: representation, plus a NUL-terminating byte
: *U64_FMTG*
:: Same as *U64_FMT* but with thousand-separators
: *U64_BFMT*
:: Same as *U64_FMT* but for binary
: *U64_OFMT*
:: Same as *U64_FMT* but for octal
: *U64_XFMT*
:: Same as *U64_FMT* but for hexadecimal
## Functions
The following functions/macros are defined :
: [u64_be](3)
:: Convert a u64 number to big endian.
: [u64_le](3)
:: Convert a u64 number to little endian.
: [u64p_be](3)
:: Similar to [u64_be](3) but takes a pointer.
: [u64p_le](3)
:: Similar to [u64_le](3) but takes a pointer.
: [u64pa_be](3)
:: Similar to [u64p_be](3) but for an array of pointers.
: [u64pa_le](3)
:: Similar to [u64p_le](3) but for an array of pointers.
: [u64_pack](3)
:: Store a u64 number encoded in little endian.
: [u64_unpack](3)
:: Read a u64 number encoded in little endian.
: [u64_pack_big](3)
:: Store a u64 number encoded in big endian.
: [u64_unpack_big](3)
:: Read a u64 number encoded in big endian.
: [u64_pack_trim](3)
:: Store a 64 number encoded in little endian trimming "unneeded" bits.
: [u64_unpack_trim](3)
:: Read a u64 number encoded in little endian with "unneeded" bits trimmed.
: [u64_fmt](3)
:: Write a u64 number as decimal into a byte array.
: [u64_fmtg](3)
:: Write a u64 number as decimal, using coma as thousand separator, into a
:: byte array.
: [u64_fmt_generic](3)
:: Write a u64 number into a byte array, encoded in specified base and
:: optionally grouped using given separator.
: [u64_0fmt_generic](3)
:: Same as [u64_fmt_generic](3) but filling with given character if less than
:: given size.
: [u64_bfmt](3)
:: Similar to [u64_fmt](3) but as binary.
: [u64_ofmt](3)
:: Similar to [u64_fmt](3) but as octal.
: [u64_xfmt](3)
:: Similar to [u64_fmt](3) but as hexadecimal.
: [u64_0fmt](3)
:: Similar to [u64_fmt](3) but filling with zeroes if less than given size.
: [u64_0fmtg](3)
:: Similar to [u64_fmtg](3) but filling with zeroes if less than given size.
: [u64_0bfmt](3)
:: Similar to [u64_bfmt](3) but filling with zeroes if less than given size.
: [u64_0ofmt](3)
:: Similar to [u64_ofmt](3) but filling with zeroes if less than given size.
: [u64_0xfmt](3)
:: Similar to [u64_xfmt](3) but filling with zeroes if less than given size.
: [u64_scan](3)
:: Read a u64 value from a byte array.
: [u64_bscan](3)
:: Similar to [u64_scan](3) but for binary value.
: [u64_oscan](3)
:: Similar to [u64_scan](3) but for octal value.
: [u64_xscan](3)
:: Similar to [u64_scan](3) but for hexadecimal value.
: [u64_scan0](3)
:: Similar to [u64_scan](3) but expects a NUL-terminated string.
: [u64_bscan0](3)
:: Similar to [u64_bscan](3) but expects a NUL-terminated string.
: [u64_oscan0](3)
:: Similar to [u64_oscan](3) but expects a NUL-terminated string.
: [u64_xscan0](3)
:: Similar to [u64_xscan](3) but expects a NUL-terminated string.