-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_tolower.c
28 lines (25 loc) · 1.09 KB
/
ft_tolower.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_tolower.c :+: :+: */
/* +:+ */
/* By: kgajadie <[email protected]> +#+ */
/* +#+ */
/* Created: 2020/11/17 16:02:01 by kgajadie #+# #+# */
/* Updated: 2021/03/05 11:59:59 by kawish ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
/* Returns the lowercase equivalent of c.
If c is not an uppercase letter, c itself is returned */
int ft_tolower(int c)
{
if ((c >= 'A') && (c <= 'Z'))
{
return (c + 32);
}
else
{
return (c);
}
}