-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isascii.c
32 lines (31 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: retahri <retahri@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/23 22:16:46 by retahri #+# #+# */
/* Updated: 2024/10/29 02:33:30 by retahri ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isascii(int c)
{
if (c >= 0 && c <= 127)
{
return (1);
}
return (0);
}
// #include <stdio.h>
// #include <stdlib.h>
// #include <_ctype.h>
// int main(void)
// {
// printf("%d\n", isascii(97));
// printf("%d\n", ft_isascii(97));
// printf("%d\n", isascii(256));
// printf("%d\n", ft_isascii(256));
// printf("%d\n", isascii(NULL));
// printf("%d\n", ft_isascii(NULL));
// }