-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isprint.c
48 lines (43 loc) · 1.33 KB
/
ft_isprint.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
41
42
43
44
45
46
47
48
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isprint.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yuske <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/21 15:42:25 by yuske #+# #+# */
/* Updated: 2023/04/01 23:17:11 by yuske ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief
*
* @param chr
* @return int
*/
int ft_isprint(int chr)
{
return (chr >= ' ' && chr <= '~');
}
// #include <locale.h>
// #include <stdio.h>
// int main(void)
// {
// int chr;
// char c;
// chr = 0;
// c = 0;
// // setlocale(LC_ALL, "");
// while (chr < 127 || c < 127)
// {
// if (ft_isprint(chr))
// {
// printf("%c ", c);
// printf("%c ", chr);
// }
// c++;
// chr++;
// }
// return (0);
// }