c语言字符串函数有哪些

Python018

c语言字符串函数有哪些,第1张

复制相关函数:memcpy、memmove、strcpy、strncpy

字符串连接函数:strcat、strncat

字符串比较函数:memcmp、strcmp、strcoll、strncmp、strxfrm、

查找函数:memchr、strchr、strcspn、strpbrk、strrchr、strspn、strstr、strtok

其他相关函数:memset、strerror、strlen

字符串的函数很多,有输入/输出函数:gets()/puts(),有拷贝函数strcpy(),字符串连接函数:strcat(),字符串比较函数strcmp(),测长度函数:strlen(),大小写转换:strlwr()/strupr()等等,如果调用的话,都要在头文件加预处理命令:

#include

“string.h”。