Null-terminated byte strings
来自cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
以null结尾的字节串(非关税壁垒)是一个序列的非零字节一个字节的值为零(终止空字符)。一个字节的字符串中的每个字节一个字符,一些字符集编码。例如,字符数组{'\x63','\x61','\x74','\0'是ASCII编码的字符串"cat"的非关税壁垒.
Original:
A null-terminated byte string (NTBS) is a sequence of nonzero bytes followed by a byte with value zero (the terminating null character). Each byte in a byte string encodes one character of some character set. For example, the character array {'\x63','\x61','\x74','\0'} is an NTBS holding the string "cat" in ASCII encoding.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 功能
Original: Character classification The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Defined in header
<cctype> | |
检查如果一个字符是字母数字 Original: checks if a character is alphanumeric The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
检查,如果一个字符是字母 Original: checks if a character is alphabetic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
检查,如果一个字符是小写的 Original: checks if a character is lowercase The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
检查,如果字符是一个大写字符 Original: checks if a character is an uppercase character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
检查,如果字符是一个数字 Original: checks if a character is a digit The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
检查,如果一个字符是十六进制的字符 Original: checks if a character is a hexadecimal character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一个字符的检查,如果是一个控制字符 Original: checks if a character is a control character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一个字符的检查,如果是一个图形字符 Original: checks if a character is a graphical character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
检查,如果字符是一个空格字符 Original: checks if a character is a space character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
(C++11) |
检查,如果字符是一个空字符 Original: checks if a character is a blank character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
如果一个字符的打印字符的检查 Original: checks if a character is a printing character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
如果一个字符的检查是一个标点符号 Original: checks if a character is a punctuation character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
Original: Character manipulation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
字符转换为小写 Original: converts a character to lowercase The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
字符转换为大写 Original: converts a character to uppercase The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
ASCII values (hex) |
characters | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 - 8 | 0x00-0x08
|
control codes (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
|
whitespaces (\n ,\v ,\f ,\r )
|
≠0
|
0
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
14 - 31 | 0x0E-0x1F
|
control codes | ≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
32 | 0x20
|
space | 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
|
backspace character (DEL )
|
≠0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
Original: Conversions to numeric formats The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Defined in header
<cstdlib> | |
一个字节的字符串转换为浮点值 Original: converts a byte string to a floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一个字节的字符串转换为整数的值 Original: converts a byte string to an integer value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一个字节的字符串转换为整数的值 Original: converts a byte string to an integer value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一个无符号整数的值转换为字节字符串 Original: converts a byte string to an unsigned integer value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一个字节的字符串转换为浮点值 Original: converts a byte string to a floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
Defined in header
<cinttypes> | |
(C++11) (C++11) |
转换为字节字符串std::intmax_t或std::uintmax_t Original: converts a byte string to std::intmax_t or std::uintmax_t The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
Original: String manipulation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Defined in header
<cstring> | |
一个字符串复制到另一个地方 Original: copies one string to another The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
复制一个字符从一个字符串到另一个的一定量的 Original: copies a certain amount of characters from one string to another The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
连接两个字符串 Original: concatenates two strings The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
连接两个字符串的字符的一定量 Original: concatenates a certain amount of characters of two strings The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
转换为字符串,这样的strcmp会产生相同的结果strcoll Original: transform a string so that strcmp would produce the same result as strcoll The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
Original: String examination The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Defined in header
<cstring> | |
返回一个给定的字符串的长度 Original: returns the length of a given string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
比较两个字符串 Original: compares two strings The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一定量的两个字符串的字符进行比较 Original: compares a certain amount of characters of two strings The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
按照目前的语言环境比较两个字符串 Original: compares two strings in accordance to the current locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
找到第一个出现的字符 Original: finds the first occurrence of a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
找到最后出现的字符 Original: finds the last occurrence of a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
返回的最大初始段,由 仅发现在另一个字节的字符串的字符的长度 Original: returns the length of the maximum initial segment that consists of only the characters found in another byte string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
返回的长度的最大初始段,由 只未发现另一个字节字符串中的字符 Original: returns the length of the maximum initial segment that consists of only the characters not found in another byte string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
发现的第一个位置在一个字符串中的任何字符,在另一个字符串 Original: finds the first location of any character in one string, in another string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
发现第一次出现的字符的子串 Original: finds the first occurrence of a substring of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
发现一个字节的字符串中的下一个标记 Original: finds the next token in a byte string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
Original: Character array manipulation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Defined in header
<cstring> | |
搜索第一次出现的字符数组 Original: searches an array for the first occurrence of a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
比较两个缓冲区 Original: compares two buffers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
字符填充了一个缓冲区 Original: fills a buffer with a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一个缓冲区拷贝到另一个地方 Original: copies one buffer to another The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
一个缓冲器移动到另一个地方 Original: moves one buffer to another The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Defined in header
<cstring> | |
返回一个给定的错误代码的文本版本 Original: returns a text version of a given error code The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |