-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isinarray.c
27 lines (24 loc) · 1.04 KB
/
ft_isinarray.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_isinarray.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lbopp <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/10 11:38:02 by lbopp #+# #+# */
/* Updated: 2017/02/10 11:38:07 by lbopp ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isinarray(char *var, char **array)
{
int i;
i = 0;
while (array[i])
{
if (!ft_strcmp(var, array[i]))
return (1);
i++;
}
return (0);
}