memchr.c

The libc implementation

Author

Martin ‘Solar’ Baute

License

Public Domain

Summary
memchr.cThe libc implementation
Functions
memchrFinds the first occurance of the character c in s, where n is the maximum amount of bytes to compare

Functions

memchr

void * memchr(const void *s,
int c,
size_t n)

Finds the first occurance of the character c in s, where n is the maximum amount of bytes to compare

Returns a pointer to the location in the buffer where c is found

Returns NULL if c could not be found

void * memchr(const void *s,
int c,
size_t n)
Finds the first occurance of the character c in s, where n is the maximum amount of bytes to compare