| 1903 | } |
| 1904 | |
| 1905 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1906 | { |
| 1907 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1908 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1909 | #else |
| 1910 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1911 | #endif |
| 1912 | if (buf == NULL) |
| 1913 | return w; |
| 1914 | if (w == -1 || w >= (int)buf_size) |
| 1915 | w = (int)buf_size - 1; |
| 1916 | buf[w] = 0; |
| 1917 | return w; |
| 1918 | } |
| 1919 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 1920 | |
| 1921 | void ImFormatStringToTempBuffer(const char** out_buf, const char** out_buf_end, const char* fmt, ...) |
no outgoing calls
no test coverage detected