-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_is_present.c
27 lines (24 loc) · 1.02 KB
/
ft_is_present.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
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_present.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nvienot <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/08 15:30:00 by nvienot #+# #+# */
/* Updated: 2019/02/08 15:30:20 by nvienot ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_is_present(char *str, char c)
{
int i;
i = 0;
while (str[i])
{
if (str[i] == c)
return (1);
i++;
}
return (0);
}