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
longstring.
-
ExessResult exess_read_long(const char *str, int64_t *out)¶
Read a
longstring 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_long(int64_t value, size_t buf_size, char *buf)¶
Write a canonical
longstring.- 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).