核心代码如下
if((int)s1.find(s2)!=-1) { cout<<s2<<" is substring of "<<s1; } else if((int)s2.find(s1)!=-1) { cout<<s1<<" is substring of "<<s2; }