mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:34:57 +00:00
AK: Add FlyString::equals_ignoring_ascii_case()
This is similar to equals_ignoring_case() but only cares about ASCII case insensitivity.
This commit is contained in:
parent
b78ee64415
commit
629b6462dc
2 changed files with 11 additions and 0 deletions
|
@ -178,4 +178,12 @@ ErrorOr<void> Formatter<FlyString>::format(FormatBuilder& builder, FlyString con
|
|||
return Formatter<StringView>::format(builder, fly_string.bytes_as_string_view());
|
||||
}
|
||||
|
||||
bool FlyString::equals_ignoring_ascii_case(FlyString const& other) const
|
||||
{
|
||||
if (*this == other)
|
||||
return true;
|
||||
// FIXME: Rename StringUtils::equals_ignoring_case to equals_ignoring_ascii_case.
|
||||
return StringUtils::equals_ignoring_case(bytes_as_string_view(), other.bytes_as_string_view());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue