-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathft_strchr.c
21 lines (19 loc) · 1 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: smbaabu <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/21 18:43:11 by smbaabu #+# #+# */
/* Updated: 2019/02/21 20:44:58 by smbaabu ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strchr(const char *s, int c)
{
while (*s != (char)c)
if (!*s++)
return (0);
return ((char *)s);
}