summaryrefslogtreecommitdiff
path: root/AK/Format.cpp
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-09 01:00:22 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-09 21:11:09 +0100
commit1160817a9e3b0084ab2be469a21626354a1b0afd (patch)
tree50acf8335a01b25654220a8c9d8a1660919a3844 /AK/Format.cpp
parent9a842ec4192ea0cdd4d4e6b6ca45aff09195c64c (diff)
downloadserenity-1160817a9e3b0084ab2be469a21626354a1b0afd.zip
AK: Add Formatter<FormatString> as helper class.
Diffstat (limited to 'AK/Format.cpp')
-rw-r--r--AK/Format.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/AK/Format.cpp b/AK/Format.cpp
index 14ed0459dd..0132807ed4 100644
--- a/AK/Format.cpp
+++ b/AK/Format.cpp
@@ -521,6 +521,11 @@ void Formatter<StringView>::format(FormatBuilder& builder, StringView value)
builder.put_string(value, m_align, m_width.value(), m_precision.value(), m_fill);
}
+void Formatter<FormatString>::vformat(FormatBuilder& builder, StringView fmtstr, TypeErasedFormatParams params)
+{
+ return Formatter<String>::format(builder, String::vformatted(fmtstr, params));
+}
+
template<typename T>
void Formatter<T, typename EnableIf<IsIntegral<T>::value>::Type>::format(FormatBuilder& builder, T value)
{