| 2325 | } |
| 2326 | |
| 2327 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 2328 | { |
| 2329 | #ifdef IMGUI_USE_STB_SPRINTF |
| 2330 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 2331 | #else |
| 2332 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 2333 | #endif |
| 2334 | if (buf == NULL) |
| 2335 | return w; |
| 2336 | if (w == -1 || w >= (int)buf_size) |
| 2337 | w = (int)buf_size - 1; |
| 2338 | buf[w] = 0; |
| 2339 | return w; |
| 2340 | } |
| 2341 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 2342 | |
| 2343 | void ImFormatStringToTempBuffer(const char** out_buf, const char** out_buf_end, const char* fmt, ...) |
no outgoing calls
no test coverage detected