s.find(k)查找子串k在母串s中的位置,返回值是字母在母串中的位置(下标记录)
例:
string s = "abcde";
string k = "cd";
int t = s.find(k) ;// 返回值为2
例题:https://www.luogu.com.cn/problem/solution/P1628
s.find(k)查找子串k在母串s中的位置,返回值是字母在母串中的位置(下标记录)
例:
string s = "abcde";
string k = "cd";
int t = s.find(k) ;// 返回值为2
例题:https://www.luogu.com.cn/problem/solution/P1628