From 7e8a53a33576b8ac6b5067ff88447936ad9d422f Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 10 Apr 2007 09:37:29 +0000 Subject: - add libbb function str_tolower to convert a string to lowercase. - shrink wget a bit --- libbb/Kbuild | 1 + libbb/str_tolower.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 libbb/str_tolower.c (limited to 'libbb') diff --git a/libbb/Kbuild b/libbb/Kbuild index 4865c9c..4e6eec3 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild @@ -77,6 +77,7 @@ lib-y += sha1.o lib-y += simplify_path.o lib-y += skip_whitespace.o lib-y += speed_table.o +lib-y += str_tolower.o lib-y += trim.o lib-y += u_signal_names.o lib-y += udp_io.o 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; +} -- cgit v1.1