-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isascii.c
36 lines (33 loc) · 1.22 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
35
36
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbutt <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/25 21:42:08 by mbutt #+# #+# */
/* Updated: 2019/02/25 21:51:57 by mbutt ### ########.fr */
/* */
/* ************************************************************************** */
/*
** The isascii() function tests for an ASCII character, which is any character
** between 0 and octal 0177 inclusive.
*/
#include "libft.h"
int ft_isascii(int c)
{
if (c >= 0 && c <= 127)
{
return (1);
}
return (0);
}
/*
** int main (void)
** {
** char c = 129;
** printf("%d", isascii(c));
** printf("\n%d", ft_isascii(c));
** return (0);
** }
*/