1
Fork 0
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:
howar6hill 2020-03-08 22:59:14 +08:00 committed by Andreas Kling
parent d8df9c510c
commit 6da131d5db

View file

@ -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)