mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +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
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
|
@ -15,7 +16,7 @@ class StringIterator final : public Object {
|
|||
JS_OBJECT(StringIterator, Object);
|
||||
|
||||
public:
|
||||
static NonnullGCPtr<StringIterator> create(Realm&, DeprecatedString string);
|
||||
static NonnullGCPtr<StringIterator> create(Realm&, String string);
|
||||
|
||||
virtual ~StringIterator() override = default;
|
||||
|
||||
|
@ -23,11 +24,11 @@ public:
|
|||
bool done() const { return m_done; }
|
||||
|
||||
private:
|
||||
explicit StringIterator(DeprecatedString string, Object& prototype);
|
||||
explicit StringIterator(String string, Object& prototype);
|
||||
|
||||
friend class StringIteratorPrototype;
|
||||
|
||||
DeprecatedString m_string;
|
||||
String m_string;
|
||||
Utf8CodePointIterator m_iterator;
|
||||
bool m_done { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue