diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-09-19 12:19:17 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-09-19 12:19:17 +0100 |
| commit | 6bc5f8c3a3f0ef2e0a4bfb51beb756608554597e (patch) | |
| tree | 5c6333282cd0c3bf2e71b0528567180a0b974720 /src/string.hh | |
| parent | db8c12fd2a9ccb3d44445e4539bc10a0f4e5c7e6 (diff) | |
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 \.
Diffstat (limited to 'src/string.hh')
| -rw-r--r-- | src/string.hh | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |
