-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isdigit.c
25 lines (24 loc) · 1.09 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: pcabanas <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/09 11:31:11 by pcabanas #+# #+# */
/* Updated: 2024/01/29 11:00:56 by pcabanas ### ########.fr */
/* */
/* ************************************************************************** */
//check whether a character is a digit
int ft_isdigit(int c)
{
return (c >= '0' && c <= '9');
}
/*#include<stdio.h>
#include<ctype.h>
int main()
{
char c = '0';
printf("%d\n", ft_isdigit(c));
printf("%d\n", isdigit(c));
}*/