42_solong/libftx/extra/ft_is_in.c
2023-01-08 18:03:40 +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);
}