#include <stddef.h>
#include "ft_mem.h"
Go to the source code of this file.
|
| void * | ft_memchr (const void *s, int c, size_t n) |
| |
◆ ft_memchr()
| void* ft_memchr |
( |
const void * |
s, |
|
|
int |
c, |
|
|
size_t |
n |
|
) |
| |
Definition at line 16 of file ft_memchr.c.
19 unsigned char looking_for;
23 p_s = (
unsigned char *)s;
24 looking_for = (
unsigned char)c;
25 while (--n > 0 && *p_s != looking_for)
27 if (*p_s == looking_for)