| 1494 | } |
| 1495 | |
| 1496 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1497 | { |
| 1498 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1499 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1500 | #else |
| 1501 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1502 | #endif |
| 1503 | if (buf == NULL) |
| 1504 | return w; |
| 1505 | if (w == -1 || w >= (int)buf_size) |
| 1506 | w = (int)buf_size - 1; |
| 1507 | buf[w] = 0; |
| 1508 | return w; |
| 1509 | } |
| 1510 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 1511 | |
| 1512 | // CRC32 needs a 1KB lookup table (not cache friendly) |
no outgoing calls
no test coverage detected