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:
parent
0d47c4e7a0
commit
b6b5ddeb3b
4 changed files with 10 additions and 9 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue