-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_toupper.c
More file actions
25 lines (24 loc) · 1.18 KB
/
ft_toupper.c
File metadata and controls
25 lines (24 loc) · 1.18 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jowagner <jowagner@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/12 14:03:16 by jowagner #+# #+# */
/* Updated: 2024/12/13 17:33:55 by jowagner ### ########.fr */
/* */
/* ************************************************************************** */
/**
* @brief Converts a lowercase letter to uppercase.
*
* @param c The character to be converted (typically an int).
* @return (The uppercase equivalent of c if it's a lowercase letter);
* otherwise, returns c unchanged.
*/
int ft_toupper(int c)
{
if (c >= 'a' && c <= 'z')
return (c - 32);
return (c);
}