-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isdigit.c
21 lines (19 loc) · 1.05 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cgodecke <cgodecke@student.42wolfsburg. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/14 21:01:15 by coder #+# #+# */
/* Updated: 2022/12/13 15:56:05 by cgodecke ### ########.fr */
/* */
/* ************************************************************************** */
// This function ft_isdigit checks if the character is digit (0-9).
// Return: 1 if yes 0 if not as int.
int ft_isdigit(int c)
{
if (c >= 48 && c <= 57)
return (1);
return (0);
}