-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_toupper.c
33 lines (29 loc) · 1.13 KB
/
ft_toupper.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rhiguita <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/02 17:20:55 by rhiguita #+# #+# */
/* Updated: 2024/05/02 22:40:18 by rhiguita ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_toupper(int c)
{
if (c >= 'a' && c <= 'z')
{
c = c - ('a' - 'A');
}
return (c);
}
/*
int main()
{
char c = 'b';
char r = ft_toupper(c);
printf("caracter normal: %c\n", c);
printf("caracter convertido: %c\n", r);
return (0);
}*/