Files
reactos/reactos/lib/ntdll/string/memchr.c
Eric Kohl e7cf9302fa Added more crt functions and fixed some.
svn path=/trunk/; revision=607
1999-07-29 21:25:04 +00:00

19 lines
273 B
C

/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/string.h>
void *
memchr(const void *s, int c, size_t n)
{
if (n)
{
const char *p = s;
do {
if (*p++ == c)
return (void *)(p-1);
} while (--n != 0);
}
return 0;
}