mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LibJS: Port StringIterator to String
This commit is contained in:
parent
0d47c4e7a0
commit
b6b5ddeb3b
Notes:
sideshowbarker
2024-07-17 01:37:36 +09:00
Author: https://github.com/trflynn89
Commit: b6b5ddeb3b
Pull-request: https://github.com/SerenityOS/serenity/pull/17031
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg
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