42_C_PISCINE/C/c02v4/ex03/ft_str_is_numeric.c

23 lines
1.0 KiB
C
Raw Normal View History

2023-05-17 12:45:25 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_numeric.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/17 15:29:04 by cchauvet #+# #+# */
/* Updated: 2022/07/18 08:43:44 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
int ft_str_is_numeric(char *str)
{
while (*str != 0)
{
if (!((*str >= '0') && (*str <= '9')))
return (0);
str++;
}
return (1);
}