string v = "aeiouAEIOU";
string s = "ae";
if(v.find(s) == v.npos){
cout << "not found";
}
else{
cout << "found";
}
C++学习笔记之查找子串是否存在
最新推荐文章于 2024-01-19 20:27:42 发布
string v = "aeiouAEIOU";
string s = "ae";
if(v.find(s) == v.npos){
cout << "not found";
}
else{
cout << "found";
}