forked from AingeruAlvarezSanchez/Libft
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathft_toupper.c
26 lines (24 loc) · 1.12 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aalvarez <aalvarez@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/08/16 23:48:50 by aalvarez #+# #+# */
/* Updated: 2022/08/17 20:30:21 by aalvarez ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief receives a lowecase alphabetic character and makes it uppercase.
*
* @param c the character to evaluate.
* @return int the new character.
*/
int ft_toupper(int c)
{
if (c >= 'a' && c <= 'z')
c -= 32;
return (c);
}