Basic declarations; allow for parameters of strings and string pieces to be specified.
| 119 | // Basic declarations; allow for parameters of strings and string |
| 120 | // pieces to be specified. |
| 121 | int string_appendf(std::string* output, const char* format, ...) { |
| 122 | va_list ap; |
| 123 | va_start(ap, format); |
| 124 | const int rc = string_vappendf(output, format, ap); |
| 125 | va_end(ap); |
| 126 | return rc; |
| 127 | } |
| 128 | |
| 129 | int string_vappendf(std::string* output, const char* format, va_list args) { |
| 130 | const size_t old_size = output->size(); |