-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isprint.c
32 lines (30 loc) · 1.22 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
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isprint.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: estettle <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/26 10:55:42 by estettle #+# #+# */
/* Updated: 2024/09/26 10:55:44 by estettle ### ########.fr */
/* */
/* ************************************************************************** */
/**
* @brief Checks if a character is a printable character (ASCII 40 to 176).
*
* @param c The char to check, as an integer.
* @return 1 if the character is printable, 0 if not.
*/
int ft_isprint(int c)
{
if (c >= '\040' && c <= '\176')
return (1);
return (0);
}
/*
#include <stdio.h>
int main(void)
{
printf("%d\n", ft_isprint('\0'));
}
*/