From 7508d30b83d4ce86bcd8f2e05cb848f9b33d4806 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 4 Oct 2015 11:22:17 +0200 Subject: [PATCH] ImGuiTextBuffer: added c_str() helper. --- imgui.h | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.h b/imgui.h index b83fd9fe..b5d3a977 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); };