-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathft_isascii.c
36 lines (31 loc) · 1.24 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: jede-ara <jede-ara@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/02 14:29:33 by jede-ara #+# #+# */
/* Updated: 2022/11/14 18:27:47 by jede-ara ### ########.fr */
/* */
/* ************************************************************************** */
/*
DESCRIÇÃO: isascii() verifica se os caracteres são pertencentes à tabela ASCII.
*/
#include "libft.h"
int ft_isascii(int c)
{
if (c >= 0 && c <= 127)
return (1);
return (0);
}
/*#include <stdio.h>
int main()
{
int c;
c = 'j';
if(ft_isascii(c))
printf( "%c pertence a tabela ASCII\n", c);
else
printf("%c não pertence a tabela ASCII\n", c);
}*/