-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_isdigit.c
More file actions
31 lines (28 loc) · 1.42 KB
/
ft_isdigit.c
File metadata and controls
31 lines (28 loc) · 1.42 KB
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: ccarnot <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/02 14:55:48 by ccarnot #+# #+# */
/* Updated: 2023/06/02 11:47:14 by ccarnot ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/****************************************************************************************************
* Function: isdigit
* Library: <ctype.h>
* Description: Determines whether a character is a digit.
* Memory allocations: None
* Crash values: None
* Return values: a non-zero value (usually 1) if the character is a digit,
0 otherwise.
***************************************************************************************************/
int ft_isdigit(int c)
{
if (c > 47 && c < 58)
return (1);
else
return (0);
}