Files
ft_malloc/libft/ft_str_is_only_char.c
2024-11-27 17:49:04 +01:00

21 lines
1016 B
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_only_char.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/29 11:11:31 by marde-vr #+# #+# */
/* Updated: 2024/04/29 11:11:57 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
int ft_str_is_only_char(char *str, char c)
{
while (c && *str == c)
str++;
if (!*str && c)
return (1);
return (0);
}