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