-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathft_isalpha.c
More file actions
35 lines (32 loc) · 1.16 KB
/
ft_isalpha.c
File metadata and controls
35 lines (32 loc) · 1.16 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jperpect <jperpect@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/10 09:55:35 by jperpect #+# #+# */
/* Updated: 2024/04/19 21:28:06 by jperpect ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
int ft_isalpha(int c)
{
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
{
return (1);
}
else
{
return (0);
}
}
/*
int main(int argc ,char **argv)
{
int a = 0;
write(1,&argv[1][0],1);
a = ft_isalpha(argv[1][0]) + '0';
write(1,&a,1);
write(1,"p",1);
}*/