mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
Import all this stuff into a single repo called Serenity.
This commit is contained in:
commit
5a30055157
67 changed files with 8836 additions and 0 deletions
25
AK/StringBuilder.cpp
Normal file
25
AK/StringBuilder.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "StringBuilder.h"
|
||||
|
||||
namespace AK {
|
||||
|
||||
void StringBuilder::append(String&& str)
|
||||
{
|
||||
m_strings.append(std::move(str));
|
||||
}
|
||||
|
||||
void StringBuilder::append(char ch)
|
||||
{
|
||||
m_strings.append(StringImpl::create(&ch, 1));
|
||||
}
|
||||
|
||||
String StringBuilder::build()
|
||||
{
|
||||
auto strings = std::move(m_strings);
|
||||
if (strings.isEmpty())
|
||||
return String::empty();
|
||||
|
||||
return String();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue