21 lines
1.0 KiB
C
21 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strchr.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/11/05 17:24:37 by dgaillet #+# #+# */
|
|
/* Updated: 2025/11/05 17:38:39 by dgaillet ### ########lyon.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
char *ft_strchr(const char *s, int c)
|
|
{
|
|
if (*s == c)
|
|
return ((char *) s);
|
|
if (!(*s))
|
|
return (0);
|
|
return (ft_strchr(s + 1, c));
|
|
}
|