-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_strchr.c
executable file
·24 lines (22 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
24
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rel-fila <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/16 13:36:54 by rel-fila #+# #+# */
/* Updated: 2022/10/18 21:53:30 by rel-fila ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strchr(const char *str, int c)
{
while (*str != (char)c)
{
if (*str == '\0')
return (NULL);
str++;
}
return ((char *)str);
}