diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-12-01 21:35:53 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-12-01 21:35:53 +0100 |
commit | 314f8f2c501322717c247fe512093a894244b702 (patch) | |
tree | 7542a204ffd719f639624f33cfa079063fc98e8c /libft/src | |
parent | commit (diff) | |
download | 42-minishell-314f8f2c501322717c247fe512093a894244b702.tar.gz 42-minishell-314f8f2c501322717c247fe512093a894244b702.tar.bz2 42-minishell-314f8f2c501322717c247fe512093a894244b702.tar.xz 42-minishell-314f8f2c501322717c247fe512093a894244b702.tar.zst 42-minishell-314f8f2c501322717c247fe512093a894244b702.zip |
Merged shotgunfixes
Diffstat (limited to 'libft/src')
-rw-r--r-- | libft/src/ft_isfulldigit.c | 23 |
1 files changed, 23 insertions, 0 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:06:39 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:06:39 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include <libft.h> + +t_bool ft_isfulldigit(char *str) +{ + unsigned int i; + + i = 0; + while (ft_isdigit(str[i])) + i++; + return (i == ft_strlen(str)); +} |