Functions | |
unsigned int | a_utf_encode (a_u32 val, void *buf) |
encode one unicode code point into UTF-8 | |
unsigned int | a_utf_decode (void const *ptr, a_size num, a_u32 *val) |
decode one unicode code point from UTF-8 | |
a_size | a_utf_length (void const *ptr, a_size num, a_size *stop) |
number of unicode code points in a UTF-8 encoded byte sequence | |
a_size | a_utf_length_ (void const *ptr, a_size num) |
decode one unicode code point from UTF-8
[in] | ptr | points to the buffer containing the UTF-8 byte |
[in] | num | number of the buffer containing the UTF-8 byte |
[out] | val | store the unicode code point
|
0 | null character or invalid |
unsigned int a_utf_encode | ( | a_u32 | val, |
void * | buf ) |
encode one unicode code point into UTF-8
[in] | val | the unicode code point to be encoded |
[in] | buf | a buffer to store a UTF-8 character |
number of unicode code points in a UTF-8 encoded byte sequence
[in] | ptr | points to the buffer containing the UTF-8 byte |
[in] | num | number of the buffer containing the UTF-8 byte |
[out] | stop | store the number of consumed bytes
|