mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
15 lines
241 B
C
15 lines
241 B
C
|
|
#include <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;
|
|
}
|