stl find_first_not_of()函数

1.头文件#include<cstring>

2.功能

#include <iostream>     
#include<cstring> 
using namespace std;
int main ()
{ string s="aaa";
cout<<s.find_first_not_of(s[0],1);//s[0]为子串,从下标为1开始找 
//找字串中有而原来的字符串中没有的 ,最先出现的那个下标 
  return 0;
}

 

posted @ 2020-08-05 17:40  miao-xixixi  阅读(256)  评论(0编辑  收藏  举报