秒了 笑死 还是规规矩矩做吧
string类的find()函数用于在字符串中查找字符或子串,返回第一个匹配的位置。
class Solution {
public:
int strStr(string haystack, string needle) {
return haystack.find(needle);
}
};
秒了 笑死 还是规规矩矩做吧
string类的find()函数用于在字符串中查找字符或子串,返回第一个匹配的位置。
class Solution {
public:
int strStr(string haystack, string needle) {
return haystack.find(needle);
}
};