Merge branch 'jk/strbuf-tolower'
* jk/strbuf-tolower: strbuf: add strbuf_tolower function
This commit is contained in:
7
strbuf.c
7
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user