Long¶
An xsd: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”.
-
ExessResult
exess_read_long(int64_t *out, const char *str)¶ Read an xsd:long string after any leading whitespace.
- Parameters
out – Set to the parsed value, or zero on error.
str – String input.
- Returns
The
countof characters read, and astatuscode.
-
ExessResult
exess_write_long(int64_t value, size_t buf_size, char *buf)¶ Write a canonical xsd:long string.
- Parameters
value – Value to write.
buf_size – The size of
bufin bytes.buf – Output buffer, or null to only measure.
- Returns
The
countof characters in the output, andstatusExessStatus.EXESS_SUCCESS, orExessStatus.EXESS_NO_SPACEif the buffer is too small.
-
EXESS_MAX_LONG_LENGTH¶ The maximum length of a canonical xsd:long string, 20.