-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalpha.c
39 lines (33 loc) · 1.27 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
33
34
35
36
37
38
39
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: julmuntz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/03 10:49:53 by julmuntz #+# #+# */
/* Updated: 2022/06/02 22:21:10 by julmuntz ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isalpha(int c)
{
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
return (1);
return (0);
}
/*
#include <stdio.h>
#include <ctype.h>
int main(int arc, char **arv)
{
int alpha;
if (arc == 2)
{
alpha = arv[1][0];
puts("\n- isalpha");
printf("%d\n", isalpha(alpha));
puts("\n- ft_isalpha");
printf("%d\n", ft_isalpha(alpha));
}
}
*/