-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strchr.c
19 lines (18 loc) · 1006 Bytes
/
ft_strchr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lgaudino <lgaudino@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/25 10:22:09 by lgaudino #+# #+# */
/* Updated: 2023/02/01 12:34:30 by lgaudino ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strchr(const char *s, int c)
{
while (*s != (char)c)
if (!*s++)
return (0);
return ((char *)s);
}