-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strchr.c
23 lines (21 loc) · 1.01 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: junkwama <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/09 07:43:53 by junkwama #+# #+# */
/* Updated: 2023/05/09 07:57:02 by junkwama ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strchr(const char *s, int c)
{
while (*s != (char)c)
{
if (!*s++)
return (NULL);
}
return ((char *)s);
}