kolibrios-fun/programs/develop/metcc/trunk/libc/string/memchr.c

11 lines
183 B
C
Raw Normal View History

void* memchr(const void* buf,int c,int count)
{
int i;
for (i=0;i<count;i++)
if (*(char*)buf==c)
return (void*)buf;
else
buf++;
return (void*)0;
}