mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +00:00
StringBuilder: Use a ByteBuffer internally instead of a Vector<String>.
This commit is contained in:
parent
074edffc44
commit
9d7da26b4e
6 changed files with 58 additions and 37 deletions
|
@ -11,14 +11,17 @@ public:
|
|||
~StringBuilder() { }
|
||||
|
||||
void append(const String&);
|
||||
void append(String&&);
|
||||
void append(char);
|
||||
void appendf(const char*, ...);
|
||||
|
||||
String build();
|
||||
ByteBuffer to_byte_buffer();
|
||||
|
||||
private:
|
||||
Vector<String> m_strings;
|
||||
void will_append(size_t);
|
||||
|
||||
ByteBuffer m_buffer;
|
||||
size_t m_length { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue