-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isalpha.c
32 lines (28 loc) · 1.14 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: msubtil- <msubtil-@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/04/04 21:24:41 by msubtil- #+# #+# */
/* Updated: 2022/05/11 22:23:20 by msubtil- ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
static int ft_isupper_aux(int c)
{
if (c >= 'A' && c <= 'Z')
return (1);
return (0);
}
static int ft_islower_aux(int c)
{
if (c >= 'a' && c <= 'z')
return (1);
return (0);
}
int ft_isalpha(int c)
{
return (ft_isupper_aux(c) || ft_islower_aux(c));
}