MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / ImFormatString

Function ImFormatString

TheForceEngine/TFE_Ui/imGUI/imgui.cpp:2018–2034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2016#endif
2017
2018int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
2019{
2020 va_list args;
2021 va_start(args, fmt);
2022#ifdef IMGUI_USE_STB_SPRINTF
2023 int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
2024#else
2025 int w = vsnprintf(buf, buf_size, fmt, args);
2026#endif
2027 va_end(args);
2028 if (buf == NULL)
2029 return w;
2030 if (w == -1 || w >= (int)buf_size)
2031 w = (int)buf_size - 1;
2032 buf[w] = 0;
2033 return w;
2034}
2035
2036int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
2037{

Callers 15

TableHeaderMethod · 0.85
DebugNodeTableMethod · 0.85
GetKeyChordNameMethod · 0.85
BeginTooltipExMethod · 0.85
BeginPopupExMethod · 0.85
NavScoreItemMethod · 0.85
ShowMetricsWindowMethod · 0.85
DebugNodeDrawListMethod · 0.85
DebugNodeTabBarMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected