| 1839 | } |
| 1840 | |
| 1841 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1842 | { |
| 1843 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1844 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1845 | #else |
| 1846 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1847 | #endif |
| 1848 | if (buf == NULL) |
| 1849 | return w; |
| 1850 | if (w == -1 || w >= (int)buf_size) |
| 1851 | w = (int)buf_size - 1; |
| 1852 | buf[w] = 0; |
| 1853 | return w; |
| 1854 | } |
| 1855 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 1856 | |
| 1857 | void ImFormatStringToTempBuffer(const char** out_buf, const char** out_buf_end, const char* fmt, ...) |
no outgoing calls
no test coverage detected