-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strchr.c
executable file
·23 lines (22 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: tseguier <tseguier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/11/20 23:46:29 by tseguier #+# #+# */
/* Updated: 2014/07/02 15:35:17 by tseguier ### ########.fr */
/* */
/* ************************************************************************** */
#include <string.h>
char *ft_strchr(const char *s, int c)
{
while (*s)
{
if (*s == (char)c)
return ((char *)s);
++s;
}
return (NULL);
}