mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:34:57 +00:00
AK: Add FlyString::operator<=>(FlyString const&)
Same as String already has.
This commit is contained in:
parent
1e820385d9
commit
e4d14e1afc
2 changed files with 7 additions and 0 deletions
|
@ -183,6 +183,11 @@ unsigned Traits<FlyString>::hash(FlyString const& fly_string)
|
|||
return fly_string.hash();
|
||||
}
|
||||
|
||||
int FlyString::operator<=>(FlyString const& other) const
|
||||
{
|
||||
return bytes_as_string_view().compare(other.bytes_as_string_view());
|
||||
}
|
||||
|
||||
ErrorOr<void> Formatter<FlyString>::format(FormatBuilder& builder, FlyString const& fly_string)
|
||||
{
|
||||
return Formatter<StringView>::format(builder, fly_string.bytes_as_string_view());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue