diff --git a/ft_isdigit.c b/ft_isdigit.c new file mode 100644 index 0000000..e74b707 --- /dev/null +++ b/ft_isdigit.c @@ -0,0 +1,8 @@ +#include "libft.h" + +int ft_isdigit(int c) +{ + if ((c >= '0' && c <= '9')) + return (1); + return (0); +} diff --git a/libft.h b/libft.h index 697b3f3..16f43aa 100644 --- a/libft.h +++ b/libft.h @@ -1 +1,2 @@ -int ft_isalpha(const char c); +int ft_isalpha(const char c); +int ft_isdigit(int c);