/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_isnumber.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud@student.42nice.fr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/05/18 16:18:15 by narnaud@stude #+# #+# */ /* Updated: 2022/05/18 16:21:52 by narnaud@stude ### ########.fr */ /* */ /* ************************************************************************** */ #include "../libft.h" int ft_isnumber(char *str) { if (*str == '-' || *str == '+') str++; while (*str) { if (!ft_isdigit(*str)) return (0); str++; } return (1); }