c++ <string.h>中包括哪些函数?
各个函数分别什么是意思
功能里面写了阿,还要我翻译阿
Functions
Copying:
memcpy Copy block of memory (function)
copy内存块
memmove Move block of memory (function)
移动内存快
strcpy Copy string (function)
copy字符串
strncpy Copy characters from string (function)
从字符串里copy出字符
Concatenation:合并
strcat Concatenate strings (function)
合并字符串
strncat Append characters from string (function)
也是合并,可以指定选用前多少个字符
Comparison:比较
memcmp Compare two blocks of memory (function)
比较两块内存
strcmp Compare two strings (function)
比较两个字串
strcoll Compare two strings using locale (function)
strncmp Compare characters of two strings (function)
比较两个字符串中的字符
strxfrm Transform string using locale (function)
采用目前区域的字符排列次序来比较字符串
Searching:
memchr Locate character in block of memory (function)
在一块内存中定位字符
strchr Locate first occurrence of character in string (function)
找第一次出现的
strcspn Get span until character in string (function)
找两串里第一个一样的
strpbrk Locate character in string (function)
在string里找char
strrchr Locate last occurrence of character in string (function)
最后一次出现
strspn Get span of character set in string (function)
找字符集
strstr Locate substring (function)
子串
strtok Split string into tokens (function)
分割字符串
Other:
memset Fill block of memory (function)
strerror Get pointer to error message string (function)
strlen Get string length (function)
Functions
Copying:
memcpy Copy block of memory (function)
copy内存块
memmove Move block of memory (function)
移动内存快
strcpy Copy string (function)
copy字符串
strncpy Copy characters from string (function)
从字符串里copy出字符
Concatenation:合并
strcat Concatenate strings (function)
合并字符串
strncat Append characters from string (function)
也是合并,可以指定选用前多少个字符
Comparison:比较
memcmp Compare two blocks of memory (function)
比较两块内存
strcmp Compare two strings (function)
比较两个字串
strcoll Compare two strings using locale (function)
strncmp Compare characters of two strings (function)
比较两个字符串中的字符
strxfrm Transform string using locale (function)
采用目前区域的字符排列次序来比较字符串
Searching:
memchr Locate character in block of memory (function)
在一块内存中定位字符
strchr Locate first occurrence of character in string (function)
找第一次出现的
strcspn Get span until character in string (function)
找两串里第一个一样的
strpbrk Locate character in string (function)
在string里找char
strrchr Locate last occurrence of character in string (function)
最后一次出现
strspn Get span of character set in string (function)
找字符集
strstr Locate substring (function)
子串
strtok Split string into tokens (function)
分割字符串
Other:
memset Fill block of memory (function)
strerror Get pointer to error message string (function)
strlen Get string length (function)
温馨提示:答案为网友推荐,仅供参考
第1个回答 推荐于2016-07-24
常用函数:
strlen 求字符串长度
strcmp 比较2个字符串是否一样
strcat 字符串连接操作
strcpy 字符串拷贝操作
strstr 查询子串
更具体的你可以查阅msdn本回答被提问者采纳
strlen 求字符串长度
strcmp 比较2个字符串是否一样
strcat 字符串连接操作
strcpy 字符串拷贝操作
strstr 查询子串
更具体的你可以查阅msdn本回答被提问者采纳
第2个回答 2010-05-02
MSDN