source: trunk/sys/dietlibc/memchr.c @ 90

Last change on this file since 90 was 1, checked in by alain, 8 years ago

First import

File size: 245 bytes
Line 
1#include <string.h>
2#include "dietfeatures.h"
3#include "dietstring.h"
4
5void* memchr(const void *s, int c, size_t n) {
6  const unsigned char *pc = (unsigned char *) s;
7  for (;n--;pc++)
8    if (*pc == c)
9      return ((void *) pc);
10  return 0;
11}
Note: See TracBrowser for help on using the repository browser.