-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_isdigit.c
More file actions
22 lines (19 loc) · 1.04 KB
/
ft_isdigit.c
File metadata and controls
22 lines (19 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fsanz-ex <fsanz-ex@student.42madrid.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/13 17:17:16 by fsanz-ex #+# #+# */
/* Updated: 2023/02/09 20:01:08 by fsanz-ex ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
//tests for any character if it is a number. Returns 0 if false, 1 if true
int ft_isdigit(int c)
{
if (c >= '0' && c <= '9')
return (1);
return (0);
}