:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / lib / msvcrt / string / strstr.c
1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/string.h>
3
4
5 char *strstr(const char *s, const char *find)
6 {
7   char c, sc;
8   size_t len;
9
10   if ((c = *find++) != 0)
11   {
12     len = strlen(find);
13     do {
14       do {
15         if ((sc = *s++) == 0)
16           return 0;
17       } while (sc != c);
18     } while (strncmp(s, find, len) != 0);
19     s--;
20   }
21   return (char *)s;
22 }