unsignedLong¶
An unsignedLong is an unsigned 64-bit integer, written in decimal.
Values range from 0 to 18446744073709551615 inclusive.
Canonical form has no leading “+” sign and no leading zeros (except for the number “0”), like “0”, and “1234”.
Non-canonical form allows a leading “+”, a leading “-” for zero, and any number of leading zeros, like “01” and “0001234”.
-
EXESS_MAX_ULONG_LENGTH¶
20U
The maximum length of a canonical
unsignedLongstring.
-
ExessResult exess_read_ulong(const char *str, uint64_t *out)¶
Read an
unsignedLongstring after any leading whitespace.- Parameters:
str – String to read.
out – Parsed value, or zero on error.
- Returns:
The
countof characters read, and astatus.
-
ExessResult exess_write_ulong(uint64_t value, size_t buf_size, char *buf)¶
Write a canonical
unsignedLongstring.- Parameters:
value – Value to write.
buf_size – Size of
bufin bytes.buf – Output buffer, or null to only measure.
- Returns:
The
countof characters in the output, and astatus(ExessStatus.EXESS_SUCCESS, orExessStatus.EXESS_NO_SPACEif the buffer is too small).