-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalnum.c
41 lines (35 loc) · 1.3 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
36
37
38
39
40
41
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: julmuntz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/04 11:58:11 by julmuntz #+# #+# */
/* Updated: 2022/06/02 22:20:53 by julmuntz ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isalnum(int c)
{
if ((c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z')
|| (c >= '0' && c <= '9'))
return (1);
return (0);
}
/*
#include <stdio.h>
#include <ctype.h>
int main(int arc, char **arv)
{
int alnum;
if (arc == 2)
{
alnum = arv[1][0];
puts("\n- isalnum");
printf("%d\n", isalnum(alnum));
puts("\n- ft_isalnum");
printf("%d\n", ft_isalnum(alnum));
}
}
*/