28 lines
1.0 KiB
C
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/04/26 13:07:30 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "extra.h"
|
|
|
|
int ft_is_in(const char *str, char c)
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (str[i] != '\0')
|
|
{
|
|
if (str[i] == c)
|
|
return (1);
|
|
i++;
|
|
}
|
|
return (0);
|
|
}
|