mbrtowc
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <wchar.h> 中定义
|
||
一个狭窄的多字节字符转换为宽字符.
原文:
Converts a narrow multibyte character to a wide character.
如果
s
是不是一个空指针,检查n
字节的多字节字符串的开始,指向的字节s
必要去完成下一个多字节字符(包括任何移位序列)的字节数来确定。如果该函数确定下一个多字节字符s
是完整的,有效的,将其转换到对应的宽字符,并将其存储在*pwc(如果pwc
不为null)..原文:
If
s
is not a null pointer, inspects at most n
bytes of the multibyte character string, beginning with the byte pointed to by s
to determine the number of bytes necessary to complete the next multibyte character (including any shift sequences). If the function determines that the next multibyte character in s
is complete and valid, converts it to the corresponding wide character and stores it in *pwc (if pwc
is not null).s
是一个空指针,n
和pwc
将被忽略,并呼吁相当于mbrtowc(NULL, "", 1, ps).原文:
If
s
is a null pointer, the values of n
and pwc
are ignored and call is equivalent to mbrtowc(NULL, "", 1, ps).如果宽字符是空字符,转换状态存储在*ps是初始位移状态.
原文:
If the wide character produced is the null character, the conversion state stored in *ps is the initial shift state.
目录 |
[编辑] 参数
pwc | - | 所得的宽字符将被写入的位置的指针
原文: pointer to the location where the resulting wide character will be written |
s | - | 指针的多字节字符串作为输入
原文: pointer to the multibyte character string used as input |
n | - | 限制的字节数,可以检查
原文: limit on the number of bytes in s that can be examined |
ps | - | 指针解释的多字节字符串时使用的转换状态
原文: pointer to the conversion state used when interpreting the multibyte string |
[编辑] 返回值
以下适用:第一
原文:
The first of the following that applies:
- 0如果从
s
(字符转换,并存储在pwc如果非空)是空字符原文:0 if the character converted froms
(and stored in pwc if non-null) was the null character - 从[1...n]成功转换的多字节字符的字节数
s
原文:the number of bytes [1...n] of the multibyte character successfully converted froms
[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
未来的多字节字符转换为宽字符 原文: converts the next multibyte character to wide character (函数) | |
一个宽字符转换为多字节表示,给定的状态 原文: converts a wide character to its multibyte representation, given state (函数) | |
C++ documentation for mbrtowc
|