MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / ImFormatString

Function ImFormatString

plugins/Cardinal/src/DearImGui/imgui.cpp:1478–1494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1476#endif
1477
1478int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
1479{
1480 va_list args;
1481 va_start(args, fmt);
1482#ifdef IMGUI_USE_STB_SPRINTF
1483 int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
1484#else
1485 int w = vsnprintf(buf, buf_size, fmt, args);
1486#endif
1487 va_end(args);
1488 if (buf == NULL)
1489 return w;
1490 if (w == -1 || w >= (int)buf_size)
1491 w = (int)buf_size - 1;
1492 buf[w] = 0;
1493 return w;
1494}
1495
1496int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
1497{

Callers 15

TableHeaderMethod · 0.85
DebugNodeTableMethod · 0.85
BeginChildExMethod · 0.85
BeginTooltipExMethod · 0.85
BeginPopupExMethod · 0.85
NavScoreItemMethod · 0.85
NavUpdateMethod · 0.85
ShowMetricsWindowMethod · 0.85
DebugNodeDrawListMethod · 0.85
DebugNodeTabBarMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected