| 1433 | #endif |
| 1434 | |
| 1435 | int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) |
| 1436 | { |
| 1437 | va_list args; |
| 1438 | va_start(args, fmt); |
| 1439 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1440 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1441 | #else |
| 1442 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1443 | #endif |
| 1444 | va_end(args); |
| 1445 | if (buf == NULL) |
| 1446 | return w; |
| 1447 | if (w == -1 || w >= (int)buf_size) |
| 1448 | w = (int)buf_size - 1; |
| 1449 | buf[w] = 0; |
| 1450 | return w; |
| 1451 | } |
| 1452 | |
| 1453 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1454 | { |
no outgoing calls
no test coverage detected