#include <string>ios
#include <iostream>
using namespace std;
int main()
{
string strFirst ( "abced" ),strSecond("abc abc abd def");
cout<<strFirst.find("a")<<endl;//输出结果为0,说明a当前的索引位置为0
//函数原型:size_type find_first_not_of( Char ch, size_type index = 0 ) const;
//返回在字符串中首次不匹配 d 的首字符索引,从2开始。
cout<<strFirst.find_first_not_of ( "d" ,2)<<endl; //输出结果为 2
cout<<strSecond.length()<<endl;//输出结果为15
cout<<strSecond.find_first_not_of("abc",4)<<endl; //输出结果为7
system("pause");
}