AK: Add a formatter overload for Utf16View

This commit is contained in:
Timothy Flynn 2021-08-09 12:29:42 -04:00 committed by Andreas Kling
parent c16aca7abf
commit daf559c717

View file

@ -6,6 +6,7 @@
#pragma once
#include <AK/Format.h>
#include <AK/Forward.h>
#include <AK/Optional.h>
#include <AK/Span.h>
@ -120,4 +121,12 @@ private:
}
template<>
struct AK::Formatter<AK::Utf16View> : Formatter<FormatString> {
void format(FormatBuilder& builder, AK::Utf16View const& value)
{
return builder.builder().append(value);
}
};
using AK::Utf16View;