1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

AK: Add DeprecatedStringCodePointIterator

This is a safe iterator over the underlying code points. It will be used
in Jakt to assist in the migration away from DeprecatedString.
This commit is contained in:
Andreas Kling 2023-01-27 16:26:57 +01:00
parent 0f4bbfdfb7
commit 2dc657c77e
4 changed files with 33 additions and 0 deletions

View file

@ -129,6 +129,8 @@ public:
[[nodiscard]] bool is_whitespace() const { return StringUtils::is_whitespace(*this); }
[[nodiscard]] DeprecatedStringCodePointIterator code_points() const;
[[nodiscard]] DeprecatedString trim(StringView characters, TrimMode mode = TrimMode::Both) const
{
auto trimmed_view = StringUtils::trim(view(), characters, mode);