string s1;
char ch;
1、s.find_first_of(ch)
用来查找字符串s中第一个为ch的字符的下标
2、s.find_last_of(ch)
用来查找字符串中最后一个为ch的字符的下标
3、s.find_first_not_of(ch)
用来查找字符串中第一个不为ch的字符的下标
4、s.find_last_not_of(ch)
用来查找字符串中最后一个不为ch的字符的下标
如果查找失败,就返回npos。npos表示比任何下标都大的一个值。
比如:
string s1 = "bbcdbebb";//大小为8