-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isprint.c
27 lines (26 loc) · 1.19 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isprint.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vcodrean <vcodrean@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/15 13:50:49 by vcodrean #+# #+# */
/* Updated: 2022/10/01 10:08:19 by vcodrean ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* If the value of the integer passed to the function is
* between 32 and 126(imprimible), return 1, otherwise return 0
*
* param int v The value to be checked.
*
* return 1 if the character is printable, 0 if not.
*/
int ft_isprint(int c)
{
if (c >= 32 && c <= 126)
return (1);
return (0);
}