-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strchr.c
More file actions
executable file
·21 lines (20 loc) · 1.01 KB
/
ft_strchr.c
File metadata and controls
executable file
·21 lines (20 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kalshaer <kalshaer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/24 08:53:07 by kalshaer #+# #+# */
/* Updated: 2022/08/10 09:56:06 by kalshaer ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strchr(const char *s, int c)
{
while (*s && *s != (char)c)
s++;
if (*s == (char) c)
return ((char *)s);
else
return (0);
}