Fixes :)
This commit is contained in:
9
libc/string/strstr.cpp
Normal file
9
libc/string/strstr.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <string.h>
|
||||
|
||||
char* strstr(const char* haystack, const char* needle)
|
||||
{
|
||||
for (size_t i = 0; haystack[i]; i++)
|
||||
if (memcmp(haystack + i, needle, strlen(needle)) == 0)
|
||||
return (char*)haystack + i;
|
||||
return NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user