-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strchr.c
20 lines (19 loc) · 1 KB
/
ft_strchr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: thakala <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/03 16:38:59 by thakala #+# #+# */
/* Updated: 2021/11/20 15:11:09 by thakala ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strchr(const char *s, int c)
{
while (*s && *s != (char)c)
s++;
if (*s == (char)c)
return ((char *)s);
return (0);
}