c++ string类查找子串

在s1中查找子串s:

s1.find(s);

如果能找到,则返回出现的首位置

找不到则返回-1

 

posted @ 2021-11-25 16:49  枫333  阅读(214)  评论(0)    收藏  举报