42_libft/ft_isalnum.c

23 lines
1.0 KiB
C
Raw Normal View History

2022-09-27 10:29:23 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/26 11:15:04 by cchauvet #+# #+# */
2022-10-28 12:29:59 -04:00
/* Updated: 2022/10/28 17:31:44 by cchauvet ### ########.fr */
2022-09-27 10:29:23 -04:00
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isalnum(int c)
{
2022-10-28 12:29:59 -04:00
if (('9' >= c && c >= '0')
|| ('z' >= c && c >= 'a')
|| ('Z' >= c && c >= 'A'))
2022-09-27 10:29:23 -04:00
return (1);
return (0);
}