返回某字符串中包含另一字符串的位置

class Solution {
public:
    int strStr(string haystack, string needle) {
        return haystack.find(needle);
    }
};
posted @ 2022-08-08 21:54  妖山鬼店  阅读(29)  评论(0)    收藏  举报