-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalnum.c
23 lines (23 loc) · 1.18 KB
/
ft_isalnum.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jamendoe <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/02 18:36:49 by jamendoe #+# #+# */
/* Updated: 2022/11/02 18:36:52 by jamendoe ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isalnum(int c)
{
return ((c >= 'a' && c <= 'z') || \
(c >= 'A' && c <= 'Z') || \
(c >= '0' && c <= '9'));
}
/*
ft_isalnum checks for an alphanumeric character; it is equivalent to
(isalpha(c) || isdigit(c)).
The values returned are nonzero if the character c falls into the
tested class, and zero if not
*/