| 1777 | } |
| 1778 | |
| 1779 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1780 | { |
| 1781 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1782 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1783 | #else |
| 1784 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1785 | #endif |
| 1786 | if (buf == NULL) |
| 1787 | return w; |
| 1788 | if (w == -1 || w >= (int)buf_size) |
| 1789 | w = (int)buf_size - 1; |
| 1790 | buf[w] = 0; |
| 1791 | return w; |
| 1792 | } |
| 1793 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 1794 | |
| 1795 | void ImFormatStringToTempBuffer(const char** out_buf, const char** out_buf_end, const char* fmt, ...) |
no outgoing calls
no test coverage detected