42_C_PISCINE/BSQ/ft_is_digit.c
Camille Chauvet 29ed24d567 init
2023-05-17 16:45:25 +00:00

26 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_digit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lflandri <lflandri@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/08/02 10:41:19 by cchauvet #+# #+# */
/* Updated: 2022/08/02 18:31:40 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
int ft_is_digit(char *str)
{
int i;
i = 0;
while (str[i] != 0)
{
if (!(str[i] >= '0' && str[i] <= '9'))
return (0);
i++;
}
return (1);
}