-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_toupper.c
24 lines (22 loc) · 1.16 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: oadewumi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/30 12:29:20 by oadewumi #+# #+# */
/* Updated: 2023/12/13 11:41:33 by oadewumi ### ########.fr */
/* */
/* ************************************************************************** */
/* This function checks the character returned to'int c' as an ASCII character
then it converts the charcter to uppercase if its a lowercase */
/* This function imitates the standard C library funtion 'toupper'*/
int ft_toupper(int c)
{
if (c >= 97 && c <= 122)
{
c = c -32;
}
return (c);
}