mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
AK: Add formatter for StringImpl.
This commit is contained in:
parent
2be7736010
commit
d781f3f6b5
|
@ -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…
Reference in a new issue