liba 0.1.15
An algorithm library based on C/C++
Loading...
Searching...
No Matches
Unicode Transformation Format
Collaboration diagram for Unicode Transformation Format:

Macros

#define a_utf_len(str)
 

Functions

unsigned int a_utf_encode (void *str, uint32_t val)
 encode one unicode code point into UTF-8
 
unsigned int a_utf_decode (void const *str, uint32_t *val)
 decode one unicode code point from UTF-8
 
size_t a_utf_length (void const *str)
 length of a UTF-8 string terminated with a null character
 

Detailed Description

Macro Definition Documentation

◆ a_utf_len

#define a_utf_len ( str)
Value:
size_t a_utf_length(void const *str)
length of a UTF-8 string terminated with a null character

Function Documentation

◆ a_utf_decode()

unsigned int a_utf_decode ( void const * str,
uint32_t * val )

decode one unicode code point from UTF-8

Parameters
[in]strstring terminated with a null character
[in,out]vala pointer to a variable that stores unicode
Returns
offset to the next character
Return values
0null character or invalid

◆ a_utf_encode()

unsigned int a_utf_encode ( void * str,
uint32_t val )

encode one unicode code point into UTF-8

Parameters
[in]stra buffer to store a UTF-8 character
[in]valthe unicode value to be encoded
Returns
offset to the next character

◆ a_utf_length()

size_t a_utf_length ( void const * str)

length of a UTF-8 string terminated with a null character

Parameters
[in]strstring terminated with a null character
Returns
length of the UTF-8 string