-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathft_tolower.c
27 lines (24 loc) · 1.15 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_tolower.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mihykim <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/26 16:14:09 by mihykim #+# #+# */
/* Updated: 2020/04/03 22:10:24 by mihykim ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** - Returns corresponding lower-case one,
** if the argument is an upper-case letter.
** - If there is no corresponding one, the argument is returned.
*/
int ft_tolower(int c)
{
if (c >= 'A' && c <= 'Z')
return (c + 'a' - 'A');
else
return (c);
}