-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_tolower.c
39 lines (34 loc) · 1.2 KB
/
ft_tolower.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_tolower.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: snocita <snocita@student.42wolfsburg.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/16 17:58:06 by snocita #+# #+# */
/* Updated: 2023/01/13 12:44:05 by snocita ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
// #include <stdio.h>
int ft_isuppercase(int c);
int ft_tolower(int c);
int ft_isuppercase(int c)
{
if (c >= 65 && c <= 90)
return (1);
return (0);
}
int ft_tolower(int c)
{
if (ft_isuppercase(c))
{
c += 32;
return (c);
}
return (c);
}
// int main(void)
// {
// printf("%c", ft_tolower('E'));
// }