-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_toupper.c
39 lines (36 loc) · 1.44 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
34
35
36
37
38
39
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbutt <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/25 20:47:18 by mbutt #+# #+# */
/* Updated: 2019/02/25 20:53:30 by mbutt ### ########.fr */
/* */
/* ************************************************************************** */
/*
** 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.
** RETURN VALUES: 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.
*/
#include "libft.h"
int ft_toupper(int c)
{
if (c >= 'a' && c <= 'z')
{
c = c - 32;
}
return (c);
}
/*
** int main (void)
** {
** char c = '1';
** printf("%c", ft_toupper(c));
** return(0);
** }
*/