Libft
42 Libft library documentation
Loading...
Searching...
No Matches
ft_isalnum.c File Reference

Go to the source code of this file.

Functions

int ft_isalnum (int c)
 Checks whether a character is alphanumeric.
 

Function Documentation

◆ ft_isalnum()

int ft_isalnum ( int  c)

Checks whether a character is alphanumeric.

Parameters
cCharacter value to test.
Returns
Non-zero if c is a letter or a digit, 0 otherwise.

Definition at line 19 of file ft_isalnum.c.

20{
21 return (((unsigned int)(c - '0') < 10)
22 || ((unsigned int)((c | 32) - 'a') < 26));
23}