-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalpha.c
32 lines (30 loc) · 1.29 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: retahri <retahri@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/22 19:36:16 by retahri #+# #+# */
/* Updated: 2024/10/29 02:21:26 by retahri ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isalpha(int c)
{
if ((c >= 65 && c <= 90) || (c >= 97 && c <= 122))
return (1);
return (0);
}
// #include <stdio.h>
// #include <stdlib.h>
// #include <ctype.h>
// int main(void)
// {
// printf("%d\n", isalpha(97));
// printf("%d\n", ft_isalpha(97));
// printf("%d\n", isalpha(0));
// printf("%d\n", ft_isalpha(0));
// printf("%d\n", isalpha(NULL));
// printf("%d\n", ft_isalpha(NULL));
// }