AK: Add StringBuilder::length() and trim(int)

Sometimes you want to trim a byte or two off the end.
This commit is contained in:
Andreas Kling 2019-09-29 16:20:09 +02:00
parent b5c587a106
commit 99fc7033b5

View file

@ -27,6 +27,9 @@ public:
StringView string_view() const;
void clear();
int length() const { return m_length; }
void trim(int count) { m_length -= count; }
private:
void will_append(int);