| 1884 | } |
| 1885 | |
| 1886 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1887 | { |
| 1888 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1889 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1890 | #else |
| 1891 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1892 | #endif |
| 1893 | if (buf == NULL) |
| 1894 | return w; |
| 1895 | if (w == -1 || w >= (int)buf_size) |
| 1896 | w = (int)buf_size - 1; |
| 1897 | buf[w] = 0; |
| 1898 | return w; |
| 1899 | } |
| 1900 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 1901 | |
| 1902 | void ImFormatStringToTempBuffer(const char** out_buf, const char** out_buf_end, const char* fmt, ...) |
no outgoing calls
no test coverage detected