git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
6eafaa2310a9d0b53e621e43b823ee4495e49ce3
[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
}