-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalnum.c
35 lines (32 loc) · 1.32 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
24
25
26
27
28
29
30
31
32
33
34
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: antlopez <antlopez@student.42malaga.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/30 20:35:54 by antlopez #+# #+# */
/* Updated: 2022/11/30 20:35:56 by antlopez ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isalnum(int c)
{
if ((c >= 65 && c <= 90) || (c >= 97 && c <= 122) || (c >= 48 && c <= 57))
return (1);
else
return (0);
}
// int main(void)
// {
// char a = 'a';
// char b = '+';
// char c = '5';
// printf("%d\n", ft_isalnum(a));
// printf("%d\n", ft_isalnum(b));
// printf("%d\n", ft_isalnum(c));
// printf("%d\n", isalnum(a));
// printf("%d\n", isalnum(b));
// printf("%d\n", isalnum(c));
// return (0);
// }