-
Notifications
You must be signed in to change notification settings - Fork 2
/
ft_strchr.c
19 lines (18 loc) · 1015 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: hbaddrul <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/04/29 15:16:57 by hbaddrul #+# #+# */
/* Updated: 2021/11/21 20:32:16 by hbaddrul ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strchr(const char *s, int c)
{
while (*s != (unsigned char)c)
if (!*s++)
return (0);
return ((char *)s);
}