mirror of
https://github.com/guezoloic/libft.git
synced 2026-01-25 01:34:15 +00:00
16 lines
181 B
C
16 lines
181 B
C
#include "libft.h"
|
|
|
|
char *ft_strchr(const char *s, int c)
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
while (i < ft_strlen(s))
|
|
{
|
|
if (s[i] == c)
|
|
return ((char *)s + i);
|
|
i++;
|
|
}
|
|
return (NULL);
|
|
}
|