-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isalnum.c
33 lines (30 loc) · 1.38 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edegraev <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/11 13:08:48 by edegraev #+# #+# */
/* Updated: 2023/11/08 12:05:56 by edegraev ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isalnum(int argument)
{
if (ft_isalpha(argument) || ft_isdigit(argument))
return (1);
return (0);
}
// #include <stdio.h>
// int main(void)
// {
// printf("%d\n", ft_isalnum('a')); // 1
// printf("%d\n", ft_isalnum('A')); // 1
// printf("%d\n", ft_isalnum('z')); // 1
// printf("%d\n", ft_isalnum('Z')); // 1
// printf("%d\n", ft_isalnum('1')); // 1
// printf("%d\n", ft_isalnum(' ')); // 0
// printf("%d\n", ft_isalnum('\n')); // 0
// printf("%d\n", ft_isalnum('\0')); // 0
// }