-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_istype.c
38 lines (32 loc) · 1.21 KB
/
ft_istype.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lpalacio <lpalacio@student.42madrid> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/14 19:57:51 by lpalacio #+# #+# */
/* Updated: 2022/09/20 18:57:36 by lpalacio ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isalpha(int c)
{
return ((c >= 'A' && c <= 'Z' ) || (c >= 'a' && c <= 'z'));
}
int ft_isdigit(int c)
{
return (c >= '0' && c <= '9');
}
int ft_isalnum(int c)
{
return (ft_isalpha(c) || ft_isdigit(c));
}
int ft_isascii(int c)
{
return (c >= '\0' && c <= 127);
}
int ft_isprint(int c)
{
return (c > 31 && c < 127);
}