1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

LibJS: Port StringIterator to String

This commit is contained in:
Timothy Flynn 2023-01-14 23:17:49 -05:00 committed by Linus Groh
parent 0d47c4e7a0
commit b6b5ddeb3b
4 changed files with 10 additions and 9 deletions

View file

@ -10,12 +10,12 @@
namespace JS {
NonnullGCPtr<StringIterator> StringIterator::create(Realm& realm, DeprecatedString string)
NonnullGCPtr<StringIterator> StringIterator::create(Realm& realm, String string)
{
return realm.heap().allocate<StringIterator>(realm, move(string), *realm.intrinsics().string_iterator_prototype());
}
StringIterator::StringIterator(DeprecatedString string, Object& prototype)
StringIterator::StringIterator(String string, Object& prototype)
: Object(ConstructWithPrototypeTag::Tag, prototype)
, m_string(move(string))
, m_iterator(Utf8View(m_string).begin())