| 436 | } |
| 437 | |
| 438 | int strbuf_expand_step(struct strbuf *sb, const char **formatp) |
| 439 | { |
| 440 | const char *format = *formatp; |
| 441 | const char *percent = strchrnul(format, '%'); |
| 442 | |
| 443 | strbuf_add(sb, format, percent - format); |
| 444 | if (!*percent) |
| 445 | return 0; |
| 446 | *formatp = percent + 1; |
| 447 | return 1; |
| 448 | } |
| 449 | |
| 450 | size_t strbuf_expand_literal(struct strbuf *sb, const char *placeholder) |
| 451 | { |
no test coverage detected