diff options
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)); +}  | 
