mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
AK: Add a formatter overload for Utf16View
This commit is contained in:
parent
c16aca7abf
commit
daf559c717
Notes:
sideshowbarker
2024-07-18 07:08:26 +09:00
Author: https://github.com/trflynn89
Commit: daf559c717
Pull-request: https://github.com/SerenityOS/serenity/pull/9320
Reviewed-by: https://github.com/davidot ✅
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue