mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 18:15:58 +00:00
AK: Add StringBuilder::length() and trim(int)
Sometimes you want to trim a byte or two off the end.
This commit is contained in:
parent
b5c587a106
commit
99fc7033b5
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue