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