42-archive/nm-otool/libft2/srcs/char/ft_isdigit.c
2017-10-07 17:49:14 +02:00

23 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/03 14:56:33 by jhalford #+# #+# */
/* Updated: 2016/11/03 14:56:34 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isdigit(int c)
{
unsigned char a;
a = (unsigned char)c;
if (a >= '0' && a <= '9')
return (a);
return (0);
}