-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strchr.c
24 lines (22 loc) · 1.02 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
24
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: igarbuz <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/13 15:51:38 by igarbuz #+# #+# */
/* Updated: 2019/04/18 19:59:32 by igarbuz ### ########.fr */
/* */
/* ************************************************************************** */
#include <string.h>
char *ft_strchr(const char *s, int c)
{
while (*s != (const char)c)
{
if (!*s)
return (NULL);
s++;
}
return (char *)(s);
}