find函数超简单
2023-08-09 14:26:01
发布于:广东
4阅读
0回复
0点赞
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
if(a.find(b)!=-1){
cout<<b<<" is substring of "<<a;
return 0;
}
if(b.find(a)!=-1){
cout<<a<<" is substring of "<<b;
return 0;
}
cout<<"No substring";
return 0;
}
这里空空如也
有帮助,赞一个