summaryrefslogtreecommitdiffstats
path: root/libc/ctype/tolower.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/ctype/tolower.c')
-rw-r--r--libc/ctype/tolower.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/ctype/tolower.c b/libc/ctype/tolower.c
new file mode 100644
index 00000000..398a1eb2
--- /dev/null
+++ b/libc/ctype/tolower.c
@@ -0,0 +1,19 @@
+/******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation
+ * All rights reserved.
+ * This program and the accompanying materials
+ * are made available under the terms of the BSD License
+ * which accompanies this distribution, and is available at
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * Contributors:
+ * IBM Corporation - initial implementation
+ *****************************************************************************/
+
+#include <compiler.h>
+#include <ctype.h>
+
+int __attrconst tolower(int c)
+{
+ return (((c >= 'A') && (c <= 'Z')) ? (c - 'A' + 'a' ) : c);
+}
OpenPOWER on IntegriCloud