-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isascii.c
27 lines (24 loc) · 1.14 KB
/
ft_isascii.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_isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aviholai <aviholai@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/07 12:29:06 by aviholai #+# #+# */
/* Updated: 2022/02/07 12:59:27 by aviholai ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** 'IsASCII()' checks whether the applied character is any ASCII character,
** between octals 0000 and 0177 or not.
** Returns 0 if false and non zero if true.
*/
int ft_isascii(int c)
{
if (c >= 0 && c <= 127)
return (1);
else
return (0);
}