在字符串中进行搜索的函数是strchr,它接受两个参数(Linux man手册中的描述)
SYNOPSIS
#include
char *strchr(const char *s, int c);
char *strrchr(const char *s, int c);
该函数在字符串中返回字符参数第一次出现的位置,成功就返回指向该位置的指针,未找到返回NULL
strstrSYNOPSIS
#include
char *strstr(const char *haystack, const char *needle);
用法和strchr相似



