MCPcopy Create free account
hub / github.com/ROCm/rocm-systems / string_vprintf

Function string_vprintf

projects/rocdbgapi/src/utils.cpp:223–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221} /* namespace utils */
222
223std::string
224string_vprintf (const char *format, va_list va)
225{
226 va_list copy;
227
228 va_copy (copy, va);
229 int size = vsnprintf (NULL, 0, format, copy);
230 va_end (copy);
231
232 dbgapi_assert (size >= 0);
233
234 std::string str (static_cast<size_t> (size), '\0');
235 vsnprintf (&str[0], str.size () + 1, format, va);
236 return str;
237}
238
239std::string
240string_printf (const char *format, ...)

Callers 3

vlogFunction · 0.70
fatal_errorFunction · 0.70
string_printfFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected