MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / ImFormatString

Function ImFormatString

ImGUI GLFW Tutorial/imgui/imgui.cpp:1432–1448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1430#endif
1431
1432int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
1433{
1434 va_list args;
1435 va_start(args, fmt);
1436#ifdef IMGUI_USE_STB_SPRINTF
1437 int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
1438#else
1439 int w = vsnprintf(buf, buf_size, fmt, args);
1440#endif
1441 va_end(args);
1442 if (buf == NULL)
1443 return w;
1444 if (w == -1 || w >= (int)buf_size)
1445 w = (int)buf_size - 1;
1446 buf[w] = 0;
1447 return w;
1448}
1449
1450int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
1451{

Callers 15

TableHeaderMethod · 0.70
DebugNodeTableMethod · 0.70
BeginChildExMethod · 0.70
BeginTooltipExMethod · 0.70
BeginPopupExMethod · 0.70
NavScoreItemMethod · 0.70
NavUpdateMethod · 0.70
ShowMetricsWindowMethod · 0.70
DebugNodeDrawListMethod · 0.70
DebugNodeTabBarMethod · 0.70
AddFontDefaultMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected