-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_tolower.c
42 lines (35 loc) · 1.31 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
40
41
42
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_tolower.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rnarciso <rnarciso@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/04 04:41:41 by rnarciso #+# #+# */
/* Updated: 2022/11/18 09:30:35 by rnarciso ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_tolower(int i)
{
if (i >= 'A' && i <= 'Z')
return (i + 32);
return (i);
}
/*
#include <stdio.h>
int main(void)
{
char c, result;
c = 'M';
result = ft_tolower(c);
printf("tolower(%c) = %c\n", c, result);
c = 'm';
result = ft_tolower(c);
printf("tolower(%c) = %c\n", c, result);
c = '+';
result = ft_tolower(c);
printf("tolower(%c) = %c\n", c, result);
return 0;
}
*/