-
Notifications
You must be signed in to change notification settings - Fork 2
/
ft_isascii.c
34 lines (31 loc) · 1.35 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
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cado-car <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/07/30 20:21:41 by cado-car #+# #+# */
/* Updated: 2021/07/30 20:21:41 by cado-car ### ########lyon.fr */
/* */
/* ************************************************************************** */
/*
* LIBRARY
* #include <ctype.h>
* DESCRIPTION
* The isascii() function tests for an ASCII character, which is any character
* between 0 and octal 0177 inclusive.
* PARAMETERS
* #1. The character to test.
* RETURN VALUES
* The isascii() function returns zero if the character tests false and returns
* non-zero if the character tests true.
*/
#include "libft.h"
int ft_isascii(int c)
{
if (c >= 0 && c <= 127)
return (1);
else
return (0);
}