diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-04-10 09:37:29 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-04-10 09:37:29 +0000 |
commit | 7e8a53a33576b8ac6b5067ff88447936ad9d422f (patch) | |
tree | 3ebe0789461f69c10d24acaa5fa263718d54afff /libbb | |
parent | 3f3aa2a57dc648ade9083f3b3ad83cce8206b912 (diff) | |
download | busybox-w32-7e8a53a33576b8ac6b5067ff88447936ad9d422f.tar.gz busybox-w32-7e8a53a33576b8ac6b5067ff88447936ad9d422f.tar.bz2 busybox-w32-7e8a53a33576b8ac6b5067ff88447936ad9d422f.zip |
- add libbb function str_tolower to convert a string to lowercase.
- shrink wget a bit
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Kbuild | 1 | ||||
-rw-r--r-- | libbb/str_tolower.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild index 4865c9c7c..4e6eec38b 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild | |||
@@ -77,6 +77,7 @@ lib-y += sha1.o | |||
77 | lib-y += simplify_path.o | 77 | lib-y += simplify_path.o |
78 | lib-y += skip_whitespace.o | 78 | lib-y += skip_whitespace.o |
79 | lib-y += speed_table.o | 79 | lib-y += speed_table.o |
80 | lib-y += str_tolower.o | ||
80 | lib-y += trim.o | 81 | lib-y += trim.o |
81 | lib-y += u_signal_names.o | 82 | lib-y += u_signal_names.o |
82 | lib-y += udp_io.o | 83 | lib-y += udp_io.o |
diff --git a/libbb/str_tolower.c b/libbb/str_tolower.c new file mode 100644 index 000000000..037f717c7 --- /dev/null +++ b/libbb/str_tolower.c | |||
@@ -0,0 +1,13 @@ | |||
1 | /* vi set: sw=4 ts=4: */ | ||
2 | /* Convert string str to lowercase, return str. | ||
3 | * | ||
4 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
5 | */ | ||
6 | #include "libbb.h" | ||
7 | char* str_tolower(char *str) | ||
8 | { | ||
9 | char *c; | ||
10 | for (c = str; *c; ++c) | ||
11 | *c = tolower(*c); | ||
12 | return str; | ||
13 | } | ||