ft_isalpha
Subject
ISALPHA(3) (simplified)
NAME
isalpha -- alphabetic character test
SYNOPSIS
int isalpha(int c)
DECRIPTION
The isalpha() function tests for any character for which isupper(3) or islower(3) is true. The value of the argument must be resprensentable as an unsigned char or the value of EOF.
RETURN VALUES
The isalpha() function return zero if the character tests false and returns non-zero if the character tests true.
Understandable explanation
For this function, the man is self-explanatory, but I'll still explain it in other words.
The isalpha()
function returns a non-zero value if the character passed as an int
parameter is an alphabetical letter (lowercase or uppercase).
If the character is not alphabetical, the isalpha()
function returns 0
.
Hints
int ft_isalpha(int c)
{
if (/* c value is one of the lowercase letter in the ASCII table or if c value is one the uppercase letter in the ASCII table*/)
return (/* non-zero value of your choice */);
return (0);
}
Commented solution
Come on ! You really need the code for that function ?
Last updated
Was this helpful?