From 6bc5f8c3a3f0ef2e0a4bfb51beb756608554597e Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 19 Sep 2015 12:19:17 +0100 Subject: Add simple markup support to generate display lines from strings The syntax is simply {face} to enable the given face, use \{ to escape a {, and \\ to escape a \. --- src/string.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/string.hh') diff --git a/src/string.hh b/src/string.hh index 6970e74a..d15baa34 100644 --- a/src/string.hh +++ b/src/string.hh @@ -118,6 +118,8 @@ public: [[gnu::always_inline]] void append(const char* data, ByteCount count) { m_data.append(data, (size_t)(int)count); } + void clear() { m_data.clear(); } + void push_back(char c) { m_data.push_back(c); } void resize(ByteCount size) { m_data.resize((size_t)(int)size); } void reserve(ByteCount size) { m_data.reserve((size_t)(int)size); } -- cgit v1.2.3