-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalpha.c
42 lines (39 loc) · 1.46 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
40
41
42
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbutt <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/25 21:06:27 by mbutt #+# #+# */
/* Updated: 2019/02/25 21:15:42 by mbutt ### ########.fr */
/* */
/* ************************************************************************** */
/*
** The isalpha() function tests for any character for which isupper(3) or
** islower(3) is true. The value of the argument must be representable as an
** unsigned char or the value of EOF.
** RETURN VALUES: The isalpha() function returns zero if the character tests
** false and returns non-zero if the character tests true.
*/
#include "libft.h"
int ft_isalpha(int c)
{
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
{
return (1);
}
else
{
return (0);
}
}
/*
** int main (void)
** {
** char c = '0';
** printf("%d", isalpha(c));
** printf("\n%d", ft_isalpha(c));
** return(0);
**}
*/