update for HEAD-2003091401
[reactos.git] / lib / ntdll / string / strstr.c
1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <string.h>
3 //#include <unconst.h>
4
5 /*
6  * @implemented
7  */
8 char *
9 strstr(const char *s, const char *find)
10 {
11   char c, sc;
12   size_t len;
13
14   if ((c = *find++) != 0)
15   {
16     len = strlen(find);
17     do {
18       do {
19         if ((sc = *s++) == 0)
20           return 0;
21       } while (sc != c);
22     } while (strncmp(s, find, len) != 0);
23     s--;
24   }
25   return (char *)s;
26 }