AK: Remove DeprecatedStringCodePointIterator

The functionality in this class is no longer used, we can just use
`Utf8View` instead.
This commit is contained in:
Jonne Ransijn 2024-11-14 20:28:30 +01:00 committed by Andreas Kling
commit d842d04be4
Notes: github-actions[bot] 2024-11-15 09:47:25 +00:00
4 changed files with 5 additions and 40 deletions

View file

@ -387,9 +387,9 @@ Vector<size_t> ByteString::find_all(StringView needle) const
return StringUtils::find_all(*this, needle);
}
DeprecatedStringCodePointIterator ByteString::code_points() const
Utf8CodePointIterator ByteString::code_points() const&
{
return DeprecatedStringCodePointIterator(*this);
return Utf8CodePointIterator { reinterpret_cast<u8 const*>(characters()), length() };
}
ErrorOr<ByteString> ByteString::from_utf8(ReadonlyBytes bytes)