boolean¶
A boolean has only two possible values, canonically written as “false” and “true”.
The non-canonical forms “0” and “1” are also supported.
-
EXESS_MAX_BOOLEAN_LENGTH¶
5U
The maximum length of a canonical
booleanstring.
-
ExessResult exess_read_boolean(const char *str, bool *out)¶
Read a
booleanstring after any leading whitespace.- Parameters:
str – String to read.
out – Parsed value, or false on error.
- Returns:
The
countof characters read, and astatus.
-
ExessResult exess_write_boolean(bool value, size_t buf_size, char *buf)¶
Write a canonical
booleanstring.- 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).