-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strchr.c
20 lines (18 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kokaimov <kokaimov@student.42berlin.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/14 20:53:02 by kokaimov #+# #+# */
/* Updated: 2023/11/14 21:12:55 by kokaimov ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strchr(const char *s, int c)
{
if (!c)
return ((char *)s + ft_strlen(s));
return (ft_memchr(s, c, ft_strlen(s)));
}