| 1580 | } |
| 1581 | |
| 1582 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1583 | { |
| 1584 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1585 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1586 | #else |
| 1587 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1588 | #endif |
| 1589 | if (buf == NULL) |
| 1590 | return w; |
| 1591 | if (w == -1 || w >= (int)buf_size) |
| 1592 | w = (int)buf_size - 1; |
| 1593 | buf[w] = 0; |
| 1594 | return w; |
| 1595 | } |
| 1596 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 1597 | |
| 1598 | // CRC32 needs a 1KB lookup table (not cache friendly) |
no outgoing calls
no test coverage detected