-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalnum.c
37 lines (33 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yuske <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/12 03:15:36 by yfurutat #+# #+# */
/* Updated: 2022/11/19 03:27:34 by yuske ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
//1. 6L
// int ft_isalnum(int ch)
// {
// if (ch >= '0' && ch <= '9')
// return (1);
// if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
// return (1);
// else
// return (0);
// }
//2
// int ft_isalnum(int ch)
// {
// return ((ch >= '0' && ch <= '9')
// || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'));
// }
//3
int ft_isalnum(int ch)
{
return (ft_isdigit(ch) || ft_isalpha(ch));
}