string v = "aeiouAEIOU";
string s = "ae";
if(v.find(s) == v.npos){
cout << "not found";
}
else{
cout << "found";
}
C++学习笔记之查找子串是否存在
最新推荐文章于 2021-11-02 14:45:18 发布
string v = "aeiouAEIOU";
string s = "ae";
if(v.find(s) == v.npos){
cout << "not found";
}
else{
cout << "found";
}