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

Go to the source code of this file.

Functions

int ft_isdigit (int c)
 Checks whether a character is a decimal digit.
 

Function Documentation

◆ ft_isdigit()

int ft_isdigit ( int  c)

Checks whether a character is a decimal digit.

Parameters
cCharacter value to test.
Returns
Non-zero if c is in ['0', '9'], 0 otherwise.

Definition at line 19 of file ft_isdigit.c.

20{
21 return ((unsigned int)(c - '0') < 10);
22}