mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Kernel: Add KBufferBuilder::appendff.
Why does this class exist anyways? What is wrong with using StringBuilder?
This commit is contained in:
parent
d546d31a53
commit
2be7736010
Notes:
sideshowbarker
2024-07-19 01:59:10 +09:00
Author: https://github.com/asynts Commit: https://github.com/SerenityOS/serenity/commit/2be77360105 Pull-request: https://github.com/SerenityOS/serenity/pull/3705 Reviewed-by: https://github.com/awesomekling
1 changed files with 8 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue