diff options
Diffstat (limited to 'libft/ft_tolower.c')
-rw-r--r-- | libft/ft_tolower.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libft/ft_tolower.c b/libft/ft_tolower.c new file mode 100644 index 0000000..5c5d65b --- /dev/null +++ b/libft/ft_tolower.c @@ -0,0 +1,20 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_tolower.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: kdx <kdx @student.42angouleme.fr +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/09/27 09:39:00 by kdx #+# #+# */ +/* Updated: 2022/09/27 09:43:03 by kdx ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_tolower(int c) +{ + if (c >= 'A' && c <= 'Z') + return (c - 'A' + 'a'); + return (c); +} |