-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isdigit.c
25 lines (23 loc) · 1.11 KB
/
ft_isdigit.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pix <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/17 18:31:21 by pix #+# #+# */
/* Updated: 2022/04/04 02:54:57 by pix ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief checks if c is a digit (0 through 9).
*
* @param c character value to check
*
* @return (int) nonzero if character is a digit and zero if not
*/
int ft_isdigit(int c)
{
return (c >= '0' && c <= '9');
}