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 unsignedLong string.

ExessResult exess_read_ulong(const char *str, uint64_t *out)

Read an unsignedLong string after any leading whitespace.

Parameters:
  • str – String to read.

  • out – Parsed value, or zero on error.

Returns:

The count of characters read, and a status.

ExessResult exess_write_ulong(uint64_t value, size_t buf_size, char *buf)

Write a canonical unsignedLong string.

Parameters:
  • value – Value to write.

  • buf_size – Size of buf in bytes.

  • buf – Output buffer, or null to only measure.

Returns:

The count of characters in the output, and a status (ExessStatus.EXESS_SUCCESS, or ExessStatus.EXESS_NO_SPACE if the buffer is too small).