summaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-16 10:07:16 -0700
committerJunio C Hamano <gitster@pobox.com>2014-06-16 10:07:17 -0700
commitb4bba8de115b6aa48103443cc81a3be7111095a9 (patch)
treed29b8b7ecafbf2d319697f2315b5c5ea8f4ff0ea /strbuf.c
parentb4516df9b88989a175f88aa514a187831631f9f8 (diff)
parentffb20ce125f0ffe59002b1258b06c26747b69b7b (diff)
downloadgit-b4bba8de115b6aa48103443cc81a3be7111095a9.tar.gz
Merge branch 'jk/strbuf-tolower'
* jk/strbuf-tolower: strbuf: add strbuf_tolower function
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/strbuf.c b/strbuf.c
index f5d609a51f..c8217755e5 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -99,6 +99,13 @@ void strbuf_ltrim(struct strbuf *sb)
sb->buf[sb->len] = '\0';
}
+void strbuf_tolower(struct strbuf *sb)
+{
+ char *p = sb->buf, *end = sb->buf + sb->len;
+ for (; p < end; p++)
+ *p = tolower(*p);
+}
+
struct strbuf **strbuf_split_buf(const char *str, size_t slen,
int terminator, int max)
{