1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +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

@ -11,6 +11,7 @@
#include <AK/Function.h>
#include <AK/StdLibExtras.h>
#include <AK/StringView.h>
#include <AK/Utf8View.h>
#include <AK/Vector.h>
namespace AK {
@ -449,4 +450,9 @@ Vector<size_t> DeprecatedString::find_all(StringView needle) const
return StringUtils::find_all(*this, needle);
}
DeprecatedStringCodePointIterator DeprecatedString::code_points() const
{
return DeprecatedStringCodePointIterator(*this);
}
}