1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:57:35 +00:00

Kernel: Add KBufferBuilder::appendff.

Why does this class exist anyways? What is wrong with using
StringBuilder?
This commit is contained in:
asynts 2020-10-07 13:59:26 +02:00 committed by Andreas Kling
parent d546d31a53
commit 2be7736010

View file

@ -45,6 +45,14 @@ public:
void appendf(const char*, ...);
void appendvf(const char*, va_list);
template<typename... Parameters>
void appendff(StringView fmtstr, const Parameters&... parameters)
{
// FIXME: This is really not the way to go about it, but vformat expects a
// StringBuilder. Why does this class exist anyways?
append(String::formatted(fmtstr, parameters...));
}
KBuffer build();
private: