17 #ifndef SCC_INCL_UTIL_STRPRINTF_H_
18 #define SCC_INCL_UTIL_STRPRINTF_H_
25 #define _CRT_NO_VA_START_VALIDATION
35 inline std::string
strprintf(
const std::string format, ...) {
37 va_start(args, format);
38 size_t len = std::vsnprintf(NULL, 0, format.c_str(), args);
40 std::vector<char> vec(len + 1);
41 va_start(args, format);
42 std::vsnprintf(&vec[0], len + 1, format.c_str(), args);
std::string strprintf(const std::string format,...)
allocate and print to a string buffer