diff --git a/imgui.h b/imgui.h index b83fd9fef..b5d3a9778 100644 --- a/imgui.h +++ b/imgui.h @@ -887,6 +887,7 @@ struct ImGuiTextBuffer int size() const { return Buf.Size - 1; } bool empty() { return Buf.Size >= 2; } void clear() { Buf.clear(); Buf.push_back(0); } + const char* c_str() const { return Buf.Data; } IMGUI_API void append(const char* fmt, ...) IM_PRINTFARGS(2); IMGUI_API void appendv(const char* fmt, va_list args); };