ladybird/Userland/Libraries/LibJS/Runtime/StringIterator.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00

34 lines
717 B
C++

/*
* Copyright (c) 2020, Matthew Olsson <matthewcolsson@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Utf8View.h>
#include <LibJS/Runtime/Object.h>
namespace JS {
class StringIterator final : public Object {
JS_OBJECT(StringIterator, Object);
public:
static StringIterator* create(GlobalObject&, String string);
explicit StringIterator(Object& prototype, String string);
virtual ~StringIterator() override;
Utf8CodepointIterator& iterator() { return m_iterator; }
bool done() const { return m_done; }
private:
friend class StringIteratorPrototype;
String m_string;
Utf8CodepointIterator m_iterator;
bool m_done { false };
};
}