-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_iscntrl.c
25 lines (23 loc) · 1.14 KB
/
ft_iscntrl.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_iscntrl.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pix <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/18 02:31:28 by pix #+# #+# */
/* Updated: 2022/04/04 02:59:13 by pix ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Checks if c is a control character.
*
* @param c Character value to check
*
* @return (int) Nonzero if character is a control character and zero if not
*/
int ft_iscntrl(int c)
{
return ((c >= '\0' && c <= 0x1F) || c == 0x7F);
}