-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcchr.c
26 lines (24 loc) · 1.07 KB
/
ft_strcchr.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
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jraymond <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/02/13 00:04:05 by jraymond #+# #+# */
/* Updated: 2018/02/14 16:50:22 by jraymond ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
char *ft_strcchr(const char *s, int c, char stop)
{
while (*s && *s != stop)
{
if (*s == c)
return ((char*)s);
s++;
}
if (*s == c)
return ((char*)s);
return (NULL);
}