-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isalpha.c
37 lines (32 loc) · 1.21 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tpouget <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/14 17:04:37 by tpouget #+# #+# */
/* Updated: 2020/05/14 17:05:25 by tpouget ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isalpha(int c)
{
if (c >= 'A' && c <= 'Z')
return (1);
if (c >= 'a' && c <= 'z')
return (1);
return (0);
}
/*
#include <stdio.h>
int main(int argc, char **argv)
{
if (argc != 2)
return (0);
if (argv[1][1])
return (0);
printf("Is %c alpha ? : %d", argv[1][0], ft_isalpha(argv[1][0]));
return 0;
}
*/