-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_isascii.c
40 lines (35 loc) · 1.25 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
37
38
39
40
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yuske <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/12 03:15:53 by yfurutat #+# #+# */
/* Updated: 2022/11/17 11:01:48 by yuske ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
//1
// int ft_isascii(int ch)
// {
// if (ch >= 0 && ch <= 127)
// return (1);
// else
// return (0);
// }
//2 null char + magic nbr
// int ft_isascii(int ch)
// {
// return (ch >= '\0' && ch <= 127);
// }
//3 hexadicimal
// int ft_isascii(int ch)
// {
// return (ch >= 0x00 && ch <= 0x7f);
// }
//4
int ft_isascii(int ch)
{
return (ch >= 0 && ch <= 127);
}