AK: Add formatter for StringImpl.

This commit is contained in:
asynts 2020-10-07 13:24:46 +02:00 committed by Andreas Kling
parent 2be7736010
commit d781f3f6b5

View file

@ -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;