find()函数可以帮助你在两个字符串之间,查找很多他们的关系... #include<iostream> #include<string> using namespace std; int main() { string s,s2; int n; cin>>n; while(n--) { cin>>s>>s2; string flag; int position = s.find(s2); if (position != s.npos) cou
#include <string.h> char *strchr(const char *s, int c); The strchr() function returns a pointer to the first occurrence of the character c in the string s. char *strrchr(const char *s, int c); The strrchr() function returns a pointer to the la
一. 字符处理函数 1. 字符处理函数:<ctype.h> int isdigit(int ch) ;//是否为数字,即ch是否是0-9中的字符 int isxdigit(int ch) ;//是否为十六进制数字,即ch是否是0-9 a-z A-Z 中的字符 int isalpha(int ch) ;//是否为字母 int isalnum(int ch) ;//是否为字母或数字 int islower(int ch) ;//是否为小写字母 int isupp