1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

AK: Add FlyString::from_deprecated_fly_string()

Let's add FlyString::from_deprecated_fly_string() so we can use it
instead of FlyString::from_utf8(). This will make it easier to detect
potential unncessary allocations as we transfer to FlyString.
This commit is contained in:
Kenneth Myhra 2023-03-09 17:45:33 +01:00 committed by Linus Groh
parent 41b8d81d49
commit e28a6d5da4
2 changed files with 7 additions and 1 deletions

View file

@ -51,8 +51,9 @@ public:
// This is primarily interesting to unit tests.
[[nodiscard]] static size_t number_of_fly_strings();
// FIXME: Remove this once all code has been ported to FlyString
// FIXME: Remove these once all code has been ported to FlyString
[[nodiscard]] DeprecatedFlyString to_deprecated_fly_string() const;
static ErrorOr<FlyString> from_deprecated_fly_string(DeprecatedFlyString const&);
// Compare this FlyString against another string with ASCII caseless matching.
[[nodiscard]] bool equals_ignoring_ascii_case(FlyString const&) const;