MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / ImFormatString

Function ImFormatString

imgui_tiny_app/imgui/imgui.cpp:2350–2366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2348#endif
2349
2350int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
2351{
2352 va_list args;
2353 va_start(args, fmt);
2354#ifdef IMGUI_USE_STB_SPRINTF
2355 int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
2356#else
2357 int w = vsnprintf(buf, buf_size, fmt, args);
2358#endif
2359 va_end(args);
2360 if (buf == NULL)
2361 return w;
2362 if (w == -1 || w >= (int)buf_size)
2363 w = (int)buf_size - 1;
2364 buf[w] = 0;
2365 return w;
2366}
2367
2368int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
2369{

Callers 15

TableHeaderMethod · 0.85
DebugNodeTableMethod · 0.85
GetKeyChordNameMethod · 0.85
BeginTooltipExMethod · 0.85
BeginPopupExMethod · 0.85
BeginPopupMenuExMethod · 0.85
NavScoreItemMethod · 0.85
DockSpaceMethod · 0.85
DockSpaceOverViewportMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected