| 144 | } |
| 145 | |
| 146 | void strbuf_ltrim(struct strbuf *sb) |
| 147 | { |
| 148 | char *b = sb->buf; |
| 149 | while (sb->len > 0 && isspace(*b)) { |
| 150 | b++; |
| 151 | sb->len--; |
| 152 | } |
| 153 | memmove(sb->buf, b, sb->len); |
| 154 | sb->buf[sb->len] = '\0'; |
| 155 | } |
| 156 | |
| 157 | int strbuf_reencode(struct strbuf *sb, const char *from, const char *to) |
| 158 | { |
no outgoing calls
no test coverage detected