summaryrefslogtreecommitdiff
path: root/libbb/str_tolower.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2007-04-10 09:37:29 +0000
committerBernhard Reutner-Fischer2007-04-10 09:37:29 +0000
commit7e8a53a33576b8ac6b5067ff88447936ad9d422f (patch)
tree3ebe0789461f69c10d24acaa5fa263718d54afff /libbb/str_tolower.c
parent3f3aa2a57dc648ade9083f3b3ad83cce8206b912 (diff)
downloadbusybox-7e8a53a33576b8ac6b5067ff88447936ad9d422f.zip
busybox-7e8a53a33576b8ac6b5067ff88447936ad9d422f.tar.gz
- add libbb function str_tolower to convert a string to lowercase.
- shrink wget a bit
Diffstat (limited to 'libbb/str_tolower.c')
-rw-r--r--libbb/str_tolower.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libbb/str_tolower.c b/libbb/str_tolower.c
new file mode 100644
index 0000000..037f717
--- /dev/null
+++ b/libbb/str_tolower.c
@@ -0,0 +1,13 @@
+/* vi set: sw=4 ts=4: */
+/* Convert string str to lowercase, return str.
+ *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ */
+#include "libbb.h"
+char* str_tolower(char *str)
+{
+ char *c;
+ for (c = str; *c; ++c)
+ *c = tolower(*c);
+ return str;
+}