libft/ft_hasdigit.c
Tanguy MAZE a0c3ac75ae wow such function very test
added multiple char test functions as well as
strsplitwhitespace
2019-02-25 16:30:35 +01:00

24 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_hasdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/25 16:16:40 by tmaze #+# #+# */
/* Updated: 2019/02/25 16:17:31 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_hasdigit(char *s)
{
int i;
i = 0;
while (s[i] && !ft_isdigit(s[i]))
i++;
return (ft_isdigit(s[i]));
}