-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strchr.c
18 lines (18 loc) · 1014 Bytes
/
ft_strchr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: agoksu <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/05 17:57:21 by agoksu #+# #+# */
/* Updated: 2022/10/05 17:57:24 by agoksu ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strchr(const char *s, int c)
{
while (*s != (unsigned char)c)
if (!*s++)
return (0);
return ((char *)s);
}