AK: Add formatters for Utf8View and Utf32View

Useful for debugging, especially in templated contexts.
This commit is contained in:
Timothy Flynn 2023-02-20 08:08:40 -05:00 committed by Andreas Kling
commit 0f20586346
Notes: sideshowbarker 2024-07-17 08:43:11 +09:00
5 changed files with 35 additions and 0 deletions

View file

@ -8,6 +8,7 @@
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/Format.h>
#include <AK/StringView.h>
#include <AK/Types.h>
@ -164,6 +165,11 @@ private:
Utf8CodePointIterator m_it;
};
template<>
struct Formatter<Utf8View> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder&, Utf8View const&);
};
}
#if USING_AK_GLOBALLY