Added memorybook to parsing and cleaned most of the files
This commit is contained in:
19
libs/libft/srcs/ft_isnumber.c
Normal file
19
libs/libft/srcs/ft_isnumber.c
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user