| 2307 | #endif |
| 2308 | |
| 2309 | int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) |
| 2310 | { |
| 2311 | va_list args; |
| 2312 | va_start(args, fmt); |
| 2313 | #ifdef IMGUI_USE_STB_SPRINTF |
| 2314 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 2315 | #else |
| 2316 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 2317 | #endif |
| 2318 | va_end(args); |
| 2319 | if (buf == NULL) |
| 2320 | return w; |
| 2321 | if (w == -1 || w >= (int)buf_size) |
| 2322 | w = (int)buf_size - 1; |
| 2323 | buf[w] = 0; |
| 2324 | return w; |
| 2325 | } |
| 2326 | |
| 2327 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 2328 | { |
no outgoing calls
no test coverage detected