From 314f8f2c501322717c247fe512093a894244b702 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 1 Dec 2020 21:35:53 +0100 Subject: Merged shotgunfixes --- libft/src/ft_isfulldigit.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libft/src/ft_isfulldigit.c (limited to 'libft/src/ft_isfulldigit.c') diff --git a/libft/src/ft_isfulldigit.c b/libft/src/ft_isfulldigit.c new file mode 100644 index 0000000..d7b7d1e --- /dev/null +++ b/libft/src/ft_isfulldigit.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isdigit.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:06:39 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:06:39 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include + +t_bool ft_isfulldigit(char *str) +{ + unsigned int i; + + i = 0; + while (ft_isdigit(str[i])) + i++; + return (i == ft_strlen(str)); +} -- cgit v1.2.3