| 1662 | #endif |
| 1663 | |
| 1664 | int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) |
| 1665 | { |
| 1666 | va_list args; |
| 1667 | va_start(args, fmt); |
| 1668 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1669 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1670 | #else |
| 1671 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1672 | #endif |
| 1673 | va_end(args); |
| 1674 | if (buf == NULL) |
| 1675 | return w; |
| 1676 | if (w == -1 || w >= (int)buf_size) |
| 1677 | w = (int)buf_size - 1; |
| 1678 | buf[w] = 0; |
| 1679 | return w; |
| 1680 | } |
| 1681 | |
| 1682 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1683 | { |
no outgoing calls
no test coverage detected