diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-06-16 10:07:16 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-16 10:07:17 -0700 |
commit | b4bba8de115b6aa48103443cc81a3be7111095a9 (patch) | |
tree | d29b8b7ecafbf2d319697f2315b5c5ea8f4ff0ea /strbuf.c | |
parent | b4516df9b88989a175f88aa514a187831631f9f8 (diff) | |
parent | ffb20ce125f0ffe59002b1258b06c26747b69b7b (diff) | |
download | git-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.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) { |