-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalpha.c
27 lines (24 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aviholai <aviholai@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/03 15:13:44 by aviholai #+# #+# */
/* Updated: 2022/02/07 12:58:07 by aviholai ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** 'Isalpha()' (is alphabet) checks whether the applied character is an
** alphabet character or not, by comparing the applied parameter 'c' to the
** ASCII table. Returns 0 if false and non zero if true.
*/
int ft_isalpha(int c)
{
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))
return (1);
else
return (0);
}