| 1448 | } |
| 1449 | |
| 1450 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1451 | { |
| 1452 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1453 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1454 | #else |
| 1455 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1456 | #endif |
| 1457 | if (buf == NULL) |
| 1458 | return w; |
| 1459 | if (w == -1 || w >= (int)buf_size) |
| 1460 | w = (int)buf_size - 1; |
| 1461 | buf[w] = 0; |
| 1462 | return w; |
| 1463 | } |
| 1464 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 1465 | |
| 1466 | // CRC32 needs a 1KB lookup table (not cache friendly) |
no outgoing calls
no test coverage detected