/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_isnum.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/07/20 14:23:27 by bchanot #+# #+# */ /* Updated: 2016/07/20 14:25:22 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_isnum(const char *s) { if (*s == '+' || *s == '-') s++; if (*s == '\0') return (0); while (*s) { if (!ft_isdigit(*s)) return (0); s++; } return (1); }