ajout des fonctions atol free_tab et isnumber

This commit is contained in:
hugogogo
2021-09-27 16:51:48 +02:00
parent c335eb1f6a
commit d622367cfd
11 changed files with 221 additions and 23 deletions

19
srcs/ft_isnumber.c Normal file
View 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);
}