-
Notifications
You must be signed in to change notification settings - Fork 2
/
ft_toupper.c
28 lines (25 loc) · 1.24 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adiaz-lo <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/13 09:11:56 by adiaz-lo #+# #+# */
/* Updated: 2020/01/13 09:12:43 by adiaz-lo ### ########.fr */
/* */
/* ************************************************************************** */
/*
** This function checks if the 'c' is a lowercase alphabetical character and if
** that's the case, then it converts it to uppercase, otherwise, it leaves
** unchanged
** For further information, please check the Standard C Library Function
** 'toupper(int c)'
*/
#include "libft.h"
int ft_toupper(int c)
{
if (c >= 'a' && c <= 'z')
return (c - 32);
return (c);
}