mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00
AK: Add formatters for Utf8View and Utf32View
Useful for debugging, especially in templated contexts.
This commit is contained in:
parent
385b880862
commit
0f20586346
5 changed files with 35 additions and 0 deletions
17
AK/Utf32View.cpp
Normal file
17
AK/Utf32View.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/Utf32View.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
ErrorOr<void> Formatter<Utf32View>::format(FormatBuilder& builder, Utf32View const& string)
|
||||
{
|
||||
return builder.builder().try_append(string);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue