Null结尾的宽字符串
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
Null结尾的宽字符串(NTWS)是一个非零宽字符的序列,后面跟着一个值为零的宽字符(终止空字符)。
原文:
A null-terminated wide string is a sequence of valid wide characters, ending with a null character.
[编辑] 功能
| |
| 在头文件
<cwctype> 中定义 | |
| 检查宽字符是否是字母或数字 原文: checks if a wide character is alphanumeric (函数) | |
| 检查宽字符是否是字母 原文: checks if a wide character is alphabetic (函数) | |
| 检查宽字符是否是小写字母 原文: checks if a wide character is lowercase (函数) | |
| 检查宽字符是否是大写字母 原文: checks if a wide character is an uppercase character (函数) | |
| 检查宽字符是否是数字 原文: checks if a wide character is a digit (函数) | |
| 检查宽字符是否是十六进制数字 原文: checks if a character is a hexadecimal character (函数) | |
| 检查宽字符是否是控制字符 原文: checks if a wide character is a control character (函数) | |
| 检查宽字符是否是图形字符 原文: checks if a wide character is a graphical character (函数) | |
| 检查宽字符是否是空白字符 原文: checks if a wide character is a space character (函数) | |
| (C++11) |
检查宽字符是否是空格或tab 原文: checks if a wide character is a blank character (函数) |
| 检查宽字符是否是打印字符 原文: checks if a wide character is a printing character (函数) | |
| 检查宽字符是否是标点符号 原文: checks if a wide character is a punctuation character (函数) | |
| 根据特定的LC_CTYPE类别划分宽字符 原文: classifies a wide character according to the specified LC_CTYPE category (函数) | |
| 在当前的C语言环境查找字符划分类别 原文: looks up a character classification category in the current C locale (函数) | |
| |
| 在头文件
<cwctype> 中定义 | |
| 将宽字符转换为小写 原文: converts a wide character to lowercase (函数) | |
| 将宽字符转换为大写 原文: converts a wide character to uppercase (函数) | |
| 根据特定的LC_CTYPE映射类别进行映射 原文: performs character mapping according to the specified LC_CTYPE mapping category (函数) | |
| 在当前的C语言环境中查找字符映射类别 原文: looks up a character mapping category in the current C locale (函数) |
| ASCII 值 (十六进制) |
字符 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 - 8 | 0x00-0x08
|
控制字符 (NUL, etc.)
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 9 | 0x09
|
tab (\t)
|
≠0
|
0
|
≠0
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 10 - 13 | 0x0A-0x0D
|
空白字符 (\n,\v,\f,\r)
|
≠0
|
0
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 14 - 31 | 0x0E-0x1F
|
控制字符 | ≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 32 | 0x20
|
空格 | 0
|
≠0
|
≠0
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 33 - 47 | 0x21-0x2F
|
!"#$%&'()*+,-./
|
0
|
≠0
|
0
|
0
|
≠0
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 48 - 57 | 0x30-0x39
|
0123456789
|
0
|
≠0
|
0
|
0
|
≠0
|
0
|
≠0
|
0
|
0
|
0
|
≠0
|
≠0
|
| 58 - 64 | 0x3a-0x40
|
:;<=>?@
|
0
|
≠0
|
0
|
0
|
≠0
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 65 - 70 | 0x41-0x46
|
ABCDEF
|
0
|
≠0
|
0
|
0
|
≠0
|
0
|
≠0
|
≠0
|
≠0
|
0
|
0
|
≠0
|
| 71 - 90 | 0x47-0x5A
|
GHIJKLMNOPQRSTUVWXYZ
|
0
|
≠0
|
0
|
0
|
≠0
|
0
|
≠0
|
≠0
|
≠0
|
0
|
0
|
0
|
| 91 - 96 | 0x5B-0x60
|
[\]^_`
|
0
|
≠0
|
0
|
0
|
≠0
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 97 -102 | 0x61-0x66
|
abcdef
|
0
|
≠0
|
0
|
0
|
≠0
|
0
|
≠0
|
≠0
|
0
|
≠0
|
0
|
≠0
|
| 103-122 | 0x67-0x7A
|
ghijklmnopqrstuvwxyz
|
0
|
≠0
|
0
|
0
|
≠0
|
0
|
≠0
|
≠0
|
0
|
≠0
|
0
|
0
|
| 123-126 | 0x7B-0x7E
|
{|}~
|
0
|
≠0
|
0
|
0
|
≠0
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
| 127 | 0x7F
|
退格字符 (DEL)
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
| |
| 在头文件
<cwchar> 中定义 | |
| 将宽字符串转换为整数值 原文: converts a wide string to an integer value (函数) | |
| 将宽字符串转换为无符号整数值 原文: converts a wide string to an unsigned integer value (函数) | |
| 将宽字符串转换为浮点值 原文: converts a wide string to a floating point value (函数) | |
| 在头文件
<cinttypes> 中定义 | |
| (C++11) (C++11) |
将宽字符串转换std::intmax_t或std::uintmax_t 原文: converts a wide string to std::intmax_t or std::uintmax_t (函数) |
| |
| 在头文件
<cwchar> 中定义 | |
| 将一个宽字符串复制到另一个宽字符串 (函数) | |
| 将一个宽字符串的一部分复制到另一个宽字符串 原文: copies a certain amount of wide characters from one string to another (函数) | |
| 将一个宽字符串的副本附加到另一个宽字符串的末尾 原文: appends a copy of one wide string to another (函数) | |
| 将一个宽字符串的一部分附加到另一个宽字符串的末尾 原文: appends a certain amount of wide characters from one wide string to another (函数) | |
| 转换宽字符串,使wcscmp和wcscoll产生相同的结果 原文: transform a wide string so that wcscmp would produce the same result as wcscoll (函数) | |
| |
| 在头文件
<cwchar> 中定义 | |
| 返回宽字符串的长度 (函数) | |
| 比较两个宽字符串 (函数) | |
| 比较从两个宽字符串的一部分 原文: compares a certain amount of characters from two wide strings (函数) | |
| 按照目前的语言环境比较两个宽字符串 原文: compares two wide strings in accordance to the current locale (函数) | |
| 寻找宽字符第一次出现的位置 原文: finds the first occurrence of a wide character in a wide string (函数) | |
| 寻找宽字符最后出现的位置 原文: finds the last occurrence of a wide character in a wide string (函数) | |
| 返回最大初始段的长度, 它仅由另一个宽字符串中的宽字符组成 原文: returns the length of the maximum initial segment that consists of only the wide characters found in another wide string (函数) | |
| 返回最大初始段的长度, 它仅由另一个宽字符串中未出现的宽字符组成 原文: returns the length of the maximum initial segment that consists of only the wide not found in another wide string (函数) | |
| 寻找宽字符串中任意一个宽字符在另一个宽字符串中首次出现的位置 原文: finds the first location of any wide character in one wide string, in another wide string (函数) | |
| 寻找宽字符串在另一个宽字符串中首次出现的位置 原文: finds the first occurrence of a wide string within another wide string (函数) | |
| 在宽字符串中寻找下一个标记 原文: finds the next token in a wide string (函数) |
| |
| 在头文件
<cwchar> 中定义 | |
| 在两个非重叠的数组之间复制部分宽字符 原文: copies a certain amount of wide characters between two non-overlapping arrays (函数) | |
| 在两个可能重叠的数组之间复制部分宽字符 原文: copies a certain amount of wide characters between two, possibly overlapping, arrays (函数) | |
| 从两个数组中比较宽字符的一部分 原文: compares a certain amount of wide characters from two arrays (函数) | |
| 在一个宽字符数组中,寻找宽字符首次出现的位置 原文: finds the first occurrence of a wide character in a wide character array (函数) | |
| 将一个宽字符数组的每一个元素都设置为给定的宽字符 原文: copies the given wide character to every position in a wide character array (函数) |
[编辑] 类型
| 在头文件
<cwctype> 中定义 | |
wctrans_t
|
标量类型,持有特定于语言环境的字符映射
原文: scalar type that holds locale-specific character mapping |
wctype_t
|
标量类型,持有特定于语言环境的字符分类
原文: scalar type that holds locale-specific character classification |
wint_t
|
整数类型,可以持有至少一个有效的宽字符
原文: integer type that can hold any valid wide character and at least one more value |
[编辑] 宏
| 在头文件
<cwchar> 中定义 | |
| WEOF |
wint_t类型的非字符值,用来表示错误 原文: a non-character value of type wint_t used to indicate errors (常量宏) |
| WCHAR_MIN |
wchar_t的最小有效值 原文: the smallest valid value of wchar_t (常量宏) |
| WCHAR_MAX |
wchar_t的最大有效值 (常量宏) |

