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