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

Function ImFormatStringV

ImGUI GLFW Tutorial/imgui/imgui.cpp:1450–1463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1448}
1449
1450int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
1451{
1452#ifdef IMGUI_USE_STB_SPRINTF
1453 int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
1454#else
1455 int w = vsnprintf(buf, buf_size, fmt, args);
1456#endif
1457 if (buf == NULL)
1458 return w;
1459 if (w == -1 || w >= (int)buf_size)
1460 w = (int)buf_size - 1;
1461 buf[w] = 0;
1462 return w;
1463}
1464#endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS
1465
1466// CRC32 needs a 1KB lookup table (not cache friendly)

Callers 5

appendfvMethod · 0.70
TextVMethod · 0.70
LabelTextVMethod · 0.70
BulletTextVMethod · 0.70
TreeNodeExVMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected