1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:57:45 +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:
Andreas Kling 2023-03-07 19:53:21 +01:00
parent b78ee64415
commit 629b6462dc
2 changed files with 11 additions and 0 deletions

View file

@ -54,6 +54,9 @@ public:
// FIXME: Remove this once all code has been ported to FlyString
[[nodiscard]] DeprecatedFlyString to_deprecated_fly_string() const;
// Compare this FlyString against another string with ASCII caseless matching.
[[nodiscard]] bool equals_ignoring_ascii_case(FlyString const&) const;
private:
// This will hold either the pointer to the Detail::StringData it represents or the raw bytes of
// an inlined short string.