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
Notes: sideshowbarker 2024-07-19 01:59:10 +09:00

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: