feat: 28_find_the_index_of_the_first_occurrence_in_a_string

This commit is contained in:
SquidSpirit 2025-02-17 23:05:48 +08:00
parent 02a7e000a4
commit 96f51b0ae3

View File

@ -0,0 +1,9 @@
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int strStr(string haystack, string needle) {
return haystack.find(needle.c_str());
}
};