libft
ft_strintab.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* ft_strintab.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2019/10/05 23:26:15 by unite #+# #+# */
10 /* Updated: 2020/07/16 02:48:04 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "libft.h"
15 #include <stdio.h>
16 
26 int ft_strintab(const char *str, char *const tab[])
27 {
28  while (*tab)
29  {
30  if (ft_strequ(str, *tab))
31  return (1);
32  tab++;
33  }
34  return (0);
35 }
ft_strintab
int ft_strintab(const char *str, char *const tab[])
Checks if a string is in a tab.
Definition: ft_strintab.c:26
ft_strequ
int ft_strequ(const char *s1, const char *s2)
Checks that two strings are identical.
Definition: ft_strequ.c:24
libft.h