mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03: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
Notes:
sideshowbarker
2024-07-19 11:53:38 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/99fc7033b56
@ -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 New Issue
Block a user