| 2184 | } |
| 2185 | |
| 2186 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 2187 | { |
| 2188 | #ifdef IMGUI_USE_STB_SPRINTF |
| 2189 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 2190 | #else |
| 2191 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 2192 | #endif |
| 2193 | if (buf == NULL) |
| 2194 | return w; |
| 2195 | if (w == -1 || w >= (int)buf_size) |
| 2196 | w = (int)buf_size - 1; |
| 2197 | buf[w] = 0; |
| 2198 | return w; |
| 2199 | } |
| 2200 | #endif // #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS |
| 2201 | |
| 2202 | void ImFormatStringToTempBuffer(const char** out_buf, const char** out_buf_end, const char* fmt, ...) |
no outgoing calls
no test coverage detected