-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalpha.c
21 lines (20 loc) · 1.15 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: oostapen <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/08 13:30:10 by oostapen #+# #+# */
/* Updated: 2024/04/13 18:24:01 by oostapen ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**The ft_isalpha function checks if the given character is an alphabet letter.
It returns the character if it's a letter (A-Z, a-z), otherwise it returns 0.*/
int ft_isalpha(int c)
{
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))
return (c);
return (0);
}