home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Borland Programmer's Resource
/
Borland_Programmers_Resource_CD_1995.iso
/
utils
/
source
/
sh
/
std
/
stdc
/
memchr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-18
|
225b
|
20 lines
/* $Header$ */
#include <string.h>
Void *
memchr(ap, c, n)
Const Void *ap;
register int c;
register size_t n;
{
register char *p = ap;
if (n++ > 0)
while (--n > 0)
if (*p++ == c)
return --p;
return NULL;
}