-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_toupper.c
27 lines (26 loc) · 1.3 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jamendoe <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/02 18:39:10 by jamendoe #+# #+# */
/* Updated: 2022/11/02 18:39:16 by jamendoe ### ########.fr */
/* */
/* ************************************************************************** */
int ft_toupper(int c)
{
if (c >= 'a' && c <= 'z')
return (c -= 32);
else
return (c);
}
/*
The toupper() function converts a lower-case letter to the corresponding
upper-case letter. The argument must be representable as an unsigned
char or the value of EOF.
If the argument is a lower-case letter, the toupper() function returns
the corresponding upper-case letter if there is one; otherwise, the
argument is returned unchanged.
*/