-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isprint.c
31 lines (29 loc) · 1.31 KB
/
ft_isprint.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_isprint.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nholbroo <nholbroo@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/13 12:24:41 by nholbroo #+# #+# */
/* Updated: 2025/02/03 15:44:12 by nholbroo ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
Which function:
Equivalent to the function "isprint" in ctype.h.
Definition:
The isprint() function checks whether c, which must have the value of an un‐
signed char or EOF, is a printable character (32-126 as ascii value).
Return values:
Returns 1 if c is printable.
Returns 0 if c is NOT printable.
@param c The character to be checked.
*/
int ft_isprint(int c)
{
if (c >= 32 && c <= 126)
return (1);
return (0);
}