mirror of
https://github.com/reactos/reactos.git
synced 2026-07-07 09:40:21 +08:00
19 lines
273 B
C
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;
|
|
}
|