mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 12:23:29 +00:00
25 lines
334 B
C
25 lines
334 B
C
#include <string.h>
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
char *
|
|
strstr(const char *s, const char *find)
|
|
{
|
|
char c, sc;
|
|
size_t len;
|
|
|
|
if ((c = *find++) != 0)
|
|
{
|
|
len = strlen(find);
|
|
do {
|
|
do {
|
|
if ((sc = *s++) == 0)
|
|
return 0;
|
|
} while (sc != c);
|
|
} while (strncmp(s, find, len) != 0);
|
|
s--;
|
|
}
|
|
return (char *)s;
|
|
}
|