wcstoul, wcstoull
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <wchar.h> 中定义
|
||
unsigned long wcstoul( const wchar_t* str, wchar_t** str_end, int base ); |
||
unsigned long long wcstoull( const wchar_t* str, wchar_t** str_end, int base ); |
||
解释一个无符号整数的值指向一个宽字符串的
str
.原文:
Interprets an unsigned integer value in a wide string pointed to by
str
.Function discards any whitespace characters until first non-whitespace character is found. Then it takes as many characters as possible to form a valid base-n (where n=base) unsigned integer number representation and converts them to an integer value. The valid unsigned integer value consists of the following parts: None
- (可选) prefix (
0
) indicating octal base (applies only when the base is 8) - (可选) prefix (
0x
or0X
) indicating hexadecimal base (applies only when the base is 16) - a sequence of digits
The set of valid digits for base-2 integer is 01
, for base-3 integer is 012
, and so on. For bases larger than 10
, valid digits include alphabetic characters, starting from Aa
for base-11 integer, to Zz
for base-36 integer. The case of the characters is ignored.
的功能设置的指针所指向的
str_end
指向过去宽字符的最后一个字符解释。 str_end
是NULL,被忽视原文:
The functions sets the pointer pointed to by
str_end
to point to the wide character past the last character interpreted. If str_end
is NULL, it is ignored.目录 |
[编辑] 参数
str | - | null结尾的宽字符串的指针进行解释
原文: pointer to the null-terminated wide string to be interpreted |
str_end | - | 为宽字符的指针的指针.
原文: pointer to a pointer to a wide character. |
base | - | “基地”的解释的整数值
原文: base of the interpreted integer value |
[编辑] 返回值
整型值对应的内容
str
成功。如果转换的值落在相应的返回类型的范围,范围发生错误,ULONG_MAX或ULLONG_MAX返回。如果没有可以进行转换,0返回.原文:
Integer value corresponding to the contents of
str
on success. If the converted value falls out of range of corresponding return type, range error occurs and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned.[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
宽字符串转换为整数的值 原文: converts a wide string to an integer value (函数) | |
C++ documentation for wcstoul, wcstoull
|