mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
AK: Add formatter for StringImpl.
This commit is contained in:
parent
2be7736010
commit
d781f3f6b5
1 changed files with 8 additions and 0 deletions
|
@ -130,6 +130,14 @@ inline constexpr u32 string_hash(const char* characters, size_t length)
|
|||
return hash;
|
||||
}
|
||||
|
||||
template<>
|
||||
struct Formatter<StringImpl> : Formatter<StringView> {
|
||||
void format(TypeErasedFormatParams& params, FormatBuilder& builder, const StringImpl& value)
|
||||
{
|
||||
Formatter<StringView>::format(params, builder, { value.characters(), value.length() });
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
using AK::Chomp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue