-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isalnum.c
36 lines (33 loc) · 1.24 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sde-silv <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/02 16:38:23 by sde-silv #+# #+# */
/* Updated: 2023/06/12 14:36:45 by sde-silv ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
include ft_isdigit when testing
#include<ctype.h>
#include<stdio.h>
*/
int ft_isalnum(int c)
{
if ('0' <= c && c <= '9')
return (8);
else if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z'))
return (8);
return (0);
}
/*
int main(void)
{
printf ("isalnum: %d", isalnum('A'));
printf ("\nft_isalnum: %d \n", ft_isdigit('A'));
return (0);
}
*/