-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_chr2.c
40 lines (33 loc) · 1.23 KB
/
ft_chr2.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_chr2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lgillot- <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/11/19 01:28:39 by lgillot- #+# #+# */
/* Updated: 2015/11/19 01:35:43 by lgillot- ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdbool.h>
#include <ft_chr.h>
int ft_isalnum(int c)
{
return (ft_isalpha(c) || ft_isdigit(c));
}
int ft_isascii(int c)
{
return (c >= 0 && c <= 0177);
}
int ft_isprint(int c)
{
return (c >= 040 && c <= 0176);
}
int ft_tolower(int c)
{
return (ft_isupper(c) ? c + 0x20 : c);
}
int ft_toupper(int c)
{
return (ft_islower(c) ? c - 0x20 : c);
}