home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
gnu
/
libnix-0.8-src.lha
/
libnix-0.8
/
sources
/
nix
/
string
/
strstr.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-12-12
|
294 b
|
19 lines
#include <stdio.h>
#include <string.h>
char *strstr(const char *s1,const char *s2)
{ const char *c1;
const char *c2;
do
{ c1=s1;
c2=s2;
while(*c1!='\0'&&*c1==*c2)
{ c1++;
c2++; }
if(*c2=='\0')
return (char *)s1;
}while(*s1++!='\0');
return NULL;
}