| 2196 | #endif |
| 2197 | |
| 2198 | int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) |
| 2199 | { |
| 2200 | va_list args; |
| 2201 | va_start(args, fmt); |
| 2202 | #ifdef IMGUI_USE_STB_SPRINTF |
| 2203 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 2204 | #else |
| 2205 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 2206 | #endif |
| 2207 | va_end(args); |
| 2208 | if (buf == NULL) |
| 2209 | return w; |
| 2210 | if (w == -1 || w >= (int)buf_size) |
| 2211 | w = (int)buf_size - 1; |
| 2212 | buf[w] = 0; |
| 2213 | return w; |
| 2214 | } |
| 2215 | |
| 2216 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 2217 | { |
no outgoing calls
no test coverage detected