Next: , Previous: , Up: Elementary Unicode string functions <unistr.h>   [Contents][Index]


4.2 Elementary string conversions

The following functions perform conversions between the different forms of Unicode strings.

Function: uint16_t * u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf, size_t *lengthp)

Converts an UTF-8 string to an UTF-16 string.

The resultbuf and lengthp arguments are as described in chapter Conventions.

Function: uint32_t * u8_to_u32 (const uint8_t *s, size_t n, uint32_t *resultbuf, size_t *lengthp)

Converts an UTF-8 string to an UTF-32 string.

The resultbuf and lengthp arguments are as described in chapter Conventions.

Function: uint8_t * u16_to_u8 (const uint16_t *s, size_t n, uint8_t *resultbuf, size_t *lengthp)

Converts an UTF-16 string to an UTF-8 string.

The resultbuf and lengthp arguments are as described in chapter Conventions.

Function: uint32_t * u16_to_u32 (const uint16_t *s, size_t n, uint32_t *resultbuf, size_t *lengthp)

Converts an UTF-16 string to an UTF-32 string.

The resultbuf and lengthp arguments are as described in chapter Conventions.

Function: uint8_t * u32_to_u8 (const uint32_t *s, size_t n, uint8_t *resultbuf, size_t *lengthp)

Converts an UTF-32 string to an UTF-8 string.

The resultbuf and lengthp arguments are as described in chapter Conventions.

Function: uint16_t * u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf, size_t *lengthp)

Converts an UTF-32 string to an UTF-16 string.

The resultbuf and lengthp arguments are as described in chapter Conventions.