Files
42_INT_10_cube3d/libs/libft/srcs/ft_isnumber.c
2022-05-04 14:38:34 +02:00

20 lines
204 B
C

#include "libft.h"
int ft_isnumber(char *nb)
{
int i;
i = 0;
if (nb[i] == '+' || nb[i] == '-')
i++;
while (nb[i] != '\0')
{
if (ft_isdigit(nb[i]) == 0)
return (0);
i++;
}
return (1);
}