Merge branch 'jk/strbuf-tolower'

* jk/strbuf-tolower:
  strbuf: add strbuf_tolower function
This commit is contained in:
Junio C Hamano
2014-06-16 10:07:16 -07:00
4 changed files with 13 additions and 7 deletions

View File

@ -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)
{