42_minishell/libftx/extra/ft_is_in.c
Camille Chauvet 5a102e93a1 init
2023-01-31 14:40:15 +01:00

28 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_in.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/05 20:29:53 by cchauvet #+# #+# */
/* Updated: 2023/01/08 12:15:08 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "extra.h"
int ft_is_in(char *str, char c)
{
int i;
i = 0;
while (str[i] != '\0')
{
if (str[i] == c)
return (1);
i++;
}
return (0);
}