libft/srcs/ft_str_is_numeric.c
Tanguy MAZE 9f04f49de6 siffler en travaillant ! =*
libft cleanup
2019-03-23 17:13:46 +01:00

25 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_numeric.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/09 10:29:18 by tmaze #+# #+# */
/* Updated: 2018/04/09 10:59:32 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_str_is_numeric(char *str)
{
int i;
i = 0;
while (str[i])
if (!ft_isdigit(str[i++]))
return (0);
return (1);
}