mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
AK: Allow case-insensitive FlyString/StringView comparison
This commit is contained in:
parent
e9b58ff096
commit
f527e55046
2 changed files with 6 additions and 0 deletions
|
@ -190,4 +190,9 @@ bool FlyString::equals_ignoring_ascii_case(FlyString const& other) const
|
||||||
return StringUtils::equals_ignoring_ascii_case(bytes_as_string_view(), other.bytes_as_string_view());
|
return StringUtils::equals_ignoring_ascii_case(bytes_as_string_view(), other.bytes_as_string_view());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FlyString::equals_ignoring_ascii_case(StringView other) const
|
||||||
|
{
|
||||||
|
return StringUtils::equals_ignoring_ascii_case(bytes_as_string_view(), other);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ public:
|
||||||
|
|
||||||
// Compare this FlyString against another string with ASCII caseless matching.
|
// Compare this FlyString against another string with ASCII caseless matching.
|
||||||
[[nodiscard]] bool equals_ignoring_ascii_case(FlyString const&) const;
|
[[nodiscard]] bool equals_ignoring_ascii_case(FlyString const&) const;
|
||||||
|
[[nodiscard]] bool equals_ignoring_ascii_case(StringView) const;
|
||||||
|
|
||||||
template<typename... Ts>
|
template<typename... Ts>
|
||||||
[[nodiscard]] ALWAYS_INLINE constexpr bool is_one_of(Ts... strings) const
|
[[nodiscard]] ALWAYS_INLINE constexpr bool is_one_of(Ts... strings) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue