42_libft/ft_strchr.c
Camille Chauvet 1d0f0b1901 m
2022-09-27 16:29:23 +02:00

25 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/26 14:44:15 by cchauvet #+# #+# */
/* Updated: 2022/09/27 11:30:30 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *strchr(const char *s, int c)
{
while (*s)
{
if (*s == c)
return ((char *) s);
s++;
}
return (NULL);
}