| 1866 | #endif |
| 1867 | |
| 1868 | int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) |
| 1869 | { |
| 1870 | va_list args; |
| 1871 | va_start(args, fmt); |
| 1872 | #ifdef IMGUI_USE_STB_SPRINTF |
| 1873 | int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args); |
| 1874 | #else |
| 1875 | int w = vsnprintf(buf, buf_size, fmt, args); |
| 1876 | #endif |
| 1877 | va_end(args); |
| 1878 | if (buf == NULL) |
| 1879 | return w; |
| 1880 | if (w == -1 || w >= (int)buf_size) |
| 1881 | w = (int)buf_size - 1; |
| 1882 | buf[w] = 0; |
| 1883 | return w; |
| 1884 | } |
| 1885 | |
| 1886 | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) |
| 1887 | { |
no outgoing calls
no test coverage detected