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