标准库标头 <uchar.h> (C11)
来自cppreference.com
此标头是空终结多字节字符串库的一部分。
函数
(C23) | 转换窄多字节字符为 UTF-8 编码 (函数) |
(C23) | 转换 UTF-8 字符串为窄多字节编码 (函数) |
(C11) | 转换窄多字节字符为 UTF-16 编码 (函数) |
(C11) | 转换 UTF-16 字符为窄多字节编码 (函数) |
(C11) | 转换窄多字节字符为 UTF-32 编码 (函数) |
(C11) | 转换 UTF-32 字符为窄多字节编码 (函数) |
类型
(C95) | 迭代多字节字符串所需的转换信息 (结构体) |
(C23) | 8 位字符类型 (typedef) |
(C11) | 16 位字符类型 (typedef) |
(C11) | 32 位字符类型 (typedef) |
概要
#define __STDC_VERSION_UCHAR_H__ 202311L typedef /* 见描述 */ mbstate_t; typedef /* 见描述 */ size_t; typedef /* 见描述 */ char8_t; typedef /* 见描述 */ char16_t; typedef /* 见描述 */ char32_t; size_t mbrtoc8(char8_t* restrict pc8, const char* restrict s, size_t n, mbstate_t* restrict ps); size_t c8rtomb(char* restrict s, char8_t c8, mbstate_t* restrict ps); size_t mbrtoc16(char16_t* restrict pc16, const char* restrict s, size_t n, mbstate_t* restrict ps); size_t c16rtomb(char* restrict s, char16_t c16, mbstate_t* restrict ps); size_t mbrtoc32(char32_t* restrict pc32, const char* restrict s, size_t n, mbstate_t* restrict ps); size_t c32rtomb(char* restrict s, char32_t c32, mbstate_t* restrict ps);