feat: 28_find_the_index_of_the_first_occurrence_in_a_string
This commit is contained in:
parent
02a7e000a4
commit
96f51b0ae3
@ -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());
|
||||||
|
}
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user