aboutsummaryrefslogtreecommitdiff
path: root/src/ft_toupper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_toupper.c')
-rw-r--r--src/ft_toupper.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ft_toupper.c b/src/ft_toupper.c
new file mode 100644
index 0000000..8579b91
--- /dev/null
+++ b/src/ft_toupper.c
@@ -0,0 +1,20 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_toupper.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/10/07 10:14:10 by cacharle #+# #+# */
+/* Updated: 2019/11/20 01:04:51 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+int ft_toupper(int c)
+{
+ if (c >= 'a' && c <= 'z')
+ return (c ^ 0b00100000);
+ return (c);
+}