mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
AK: Add StringBuilder::appendff using the new format.
StringBuilder::appendf was already used, thus this name. If we some day replace all usages of printf, we could rename this method.
This commit is contained in:
parent
4fcdc19b14
commit
e5497a326a
3 changed files with 12 additions and 4 deletions
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
namespace AK {
|
||||
|
@ -37,7 +38,7 @@ public:
|
|||
using OutputType = String;
|
||||
|
||||
explicit StringBuilder(size_t initial_capacity = 16);
|
||||
~StringBuilder() {}
|
||||
~StringBuilder() { }
|
||||
|
||||
void append(const StringView&);
|
||||
void append(const Utf32View&);
|
||||
|
@ -47,6 +48,10 @@ public:
|
|||
void appendf(const char*, ...);
|
||||
void appendvf(const char*, va_list);
|
||||
|
||||
// Implemented in <AK/Format.h> to break circular dependency.
|
||||
template<typename... Parameters>
|
||||
void appendff(StringView fmtstr, const Parameters&...);
|
||||
|
||||
String build() const;
|
||||
String to_string() const;
|
||||
ByteBuffer to_byte_buffer() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue