-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isalpha.c
32 lines (29 loc) · 1.13 KB
/
ft_isalpha.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ael-khni <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/01 17:04:53 by ael-khni #+# #+# */
/* Updated: 2021/11/07 17:13:37 by ael-khni ### ########.fr */
/* */
/* ************************************************************************** */
static int ft_isupper(int c)
{
if (c >= 'A' && c <= 'Z')
return (1);
return (0);
}
static int ft_islower(int c)
{
if (c >= 'a' && c <= 'z')
return (1);
return (0);
}
int ft_isalpha(int c)
{
if (ft_isupper(c) || ft_islower(c))
return (1);
return (0);
}