- Define _CTYPE_DISABLE_MACROS for MSVC build.
[reactos.git] / reactos / lib / string / strstr.c
1 #include <string.h>
2
3 /*
4 * @implemented
5 */
6 char *
7 strstr(const char *s, const char *find)
8 {
9 char c, sc;
10 size_t len;
11
12 if ((c = *find++) != 0)
13 {
14 len = strlen(find);
15 do {
16 do {
17 if ((sc = *s++) == 0)
18 return 0;
19 } while (sc != c);
20 } while (strncmp(s, find, len) != 0);
21 s--;
22 }
23 return (char *)((size_t)s);
24 }