| 1759 | #endif |
| 1760 | |
| 1761 | int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) |
| 1762 | { |
| 1763 | va_list args; |
| 1764 | va_start(args, fmt); |
| 1765 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1766 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1767 | #else |
| 1768 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1769 | #endif |
| 1770 | va_end(args); |
| 1771 | if (buf == NULL) |
| 1772 | return w; |
| 1773 | if (w == -1 || w >= (int)buf_size) |
| 1774 | w = (int)buf_size - 1; |
| 1775 | buf[w] = 0; |
| 1776 | return w; |
| 1777 | } |
| 1778 | |
| 1779 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1780 | { |
no outgoing calls
no test coverage detected