char *strchr(const char *s, int c);
功能:返回字符串s中,字符c第一次出现的地址
成功返回第一次出现c的地址
失败返回NULL
char *strrchr(const char *s, int c);
功能:返回字符串s中,字符c最后一次出现的地址
成功返回最后一次出现c的地址
失败返回NULL
char *strchrnul(const char *s, int c);
功能:返回字符串s中,字符c第一次出现的地址
成功返回第一次出现的地址
失败返回字符串最后一位字节的 “the null byte”
char *strstr(const char *haystack, const char *needle);
功能:返回字符串中,needle是否出现在haystack中
成功返回字符串haystack中第一次出现needle的地址
失败返回NULL
char *strcasestr(const char *haystack, const char *needle);
功能:返回字符串中,needle是否出现在haystack中,不区分大小写
成功返回字符串haystack中第一次出现needle的地址
失败返回NULL
int strcmp(const char *s1, const char *s2);
功能:比较两个字符串是否一样
大于返回>0
等于返回0
小于返回<0
int strncmp(const char *s1, const char *s2, size_t n);
功能:比较两个字符串前n个字符是否一样
大于返回>0
等于返回0
小于返回<0
int strncasecmp(const char *s1, const char *s2, size_t n);
功能:比较两个字符串前n个字符是否一样,不区分大小写
大于返回>0
等于返回0
小于返回<0
char *strcpy(char *dest, const char *src);
功能:拷贝字符串src给dest,包括中断字符 ('\0'),dest 必须有足够的空间接受拷贝
返回dest的指针
char *strncpy(char *dest, const char *src, size_t n);
功能:拷贝src前n个字符给dest,如果scr长度小于n,多出的用null填补
返回dest的指针