-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isdigit.c
30 lines (26 loc) · 1.12 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
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isdigit.c :+: :+: */
/* +:+ */
/* By: sramos <marvin@42.fr> +#+ */
/* +#+ */
/* Created: 2023/10/03 10:39:19 by sramos #+# #+# */
/* Updated: 2024/02/27 18:05:44 by sramos ######## odam.nl */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include <ctype.h>
#include "libft.h"
int ft_isdigit(int i)
{
return (i >= '0' && i <= '9');
}
int main(void)
{
char *string;
string = "456";
printf("%i", ft_isdigit(*string));
printf("\n%i", isdigit(*string));
return (0);
}