42-archive/ls/libft/src/char/ft_isalnum.c
2016-11-27 13:47:59 +01:00

22 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/03 14:56:18 by jhalford #+# #+# */
/* Updated: 2016/11/03 15:31:33 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isalnum(int c)
{
if ((c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z')
|| (c >= '0' && c <= '9'))
return (c);
return (0);
}