mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
AK: Reduce code duplication in StringBuilder
This commit is contained in:
parent
d8df9c510c
commit
6da131d5db
1 changed files with 1 additions and 5 deletions
|
@ -54,11 +54,7 @@ void StringBuilder::append(const StringView& str)
|
|||
|
||||
void StringBuilder::append(const char* characters, size_t length)
|
||||
{
|
||||
if (!length)
|
||||
return;
|
||||
will_append(length);
|
||||
memcpy(m_buffer.data() + m_length, characters, length);
|
||||
m_length += length;
|
||||
append(StringView { characters, length });
|
||||
}
|
||||
|
||||
void StringBuilder::append(char ch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue