Unsigned Byte¶
An xsd:unsignedByte is an unsigned 8-bit integer.
Values range from 0 to 255 inclusive.
The lexical form is the same as xsd:unsignedLong, the only difference is that the value space of xsd:unsignedByte is smaller. See Unsigned Long for details.
-
ExessResult
exess_read_ubyte(uint8_t *out, const char *str)¶ Read an xsd:unsignedByte 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_ubyte(uint8_t value, size_t buf_size, char *buf)¶ Write a canonical xsd:unsignedByte 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_UBYTE_LENGTH¶ The maximum length of a canonical xsd:unsignedByte string, 3.