2023-04-26 07:02:44 -04:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ::: :::::::: */
|
|
|
|
/* ft_is_in.c :+: :+: :+: */
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
/* Created: 2023/01/05 20:29:53 by cchauvet #+# #+# */
|
2023-05-03 07:11:04 -04:00
|
|
|
/* Updated: 2023/04/26 13:07:30 by cchauvet ### ########.fr */
|
2023-04-26 07:02:44 -04:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include "extra.h"
|
|
|
|
|
2023-05-03 07:11:04 -04:00
|
|
|
int ft_is_in(const char *str, char c)
|
2023-04-26 07:02:44 -04:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
while (str[i] != '\0')
|
|
|
|
{
|
|
|
|
if (str[i] == c)
|
|
|
|
return (1);
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
return (0);
|
|
|
|
}
|