diff options
author | asynts <asynts@gmail.com> | 2020-09-22 13:11:05 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-22 15:06:40 +0200 |
commit | e5497a326aed3a869593242ceb467d8718a72e8c (patch) | |
tree | 63a6d7d48496a0438d48cc850f7a313dcaae481c /AK/Format.h | |
parent | 4fcdc19b146f8371f7d3b5b9972db667d3b3d563 (diff) | |
download | serenity-e5497a326aed3a869593242ceb467d8718a72e8c.zip |
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.
Diffstat (limited to 'AK/Format.h')
-rw-r--r-- | AK/Format.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/AK/Format.h b/AK/Format.h index f71f05ad1f..ff31d69b4c 100644 --- a/AK/Format.h +++ b/AK/Format.h @@ -100,4 +100,7 @@ String format(StringView fmtstr, const Parameters&... parameters) return Detail::Format::format(fmtstr, formatters); } -} +template<typename... Parameters> +void StringBuilder::appendff(StringView fmtstr, const Parameters&... parameters) { AK::format(*this, fmtstr, parameters...); } + +} // namespace AK |