-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isdigit.c
31 lines (28 loc) · 1.2 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
26
27
28
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tpouget <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/14 17:04:37 by tpouget #+# #+# */
/* Updated: 2020/05/14 17:05:41 by tpouget ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_isdigit(int c)
{
if (c < '0' || c > '9')
return (0);
return (1);
}
/*
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int main(int argc, char **argv)
{
printf("%c is a digit : %d\n", argv[1][0], ft_isdigit(argv[1][0]));
printf("%c is a digit : %d\n", argv[1][0], isdigit(argv[1][0]));
}
*/