int¶
An int is a signed 32-bit integer.
The lexical form is the same as long, but values range from -2147483648 to 2147483647 inclusive.
-
EXESS_MAX_INT_LENGTH¶
11U
The maximum length of a canonical
intstring.
-
ExessResult exess_read_int(const char *str, int32_t *out)¶
Read an
intstring 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_int(int32_t value, size_t buf_size, char *buf)¶
Write a canonical
intstring.- 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).