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