long

A long is a signed 64-bit integer, written in decimal.

Values range from -9223372036854775808 to 9223372036854775807 inclusive.

Canonical form has no leading “+” sign and no leading zeros (except for the number “0”), like “-1”, “0”, and “1234”.

Non-canonical form allows a leading “+” and any number of leading zeros, like “01” and “+0001234”.

EXESS_MAX_LONG_LENGTH

20U

The maximum length of a canonical long string.

ExessResult exess_read_long(const char *str, int64_t *out)

Read a long 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_long(int64_t value, size_t buf_size, char *buf)

Write a canonical long 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).