StringIterator

StringIterator: StringIterator, hasValue, value, increment, print, toList

struct StringIterator: Iterator<char&>, Printable

Iterates over the characters of a string.

StringIterator

StringIterator(string s)

Initializes an iterator over the given string.

hasValue

bool hasValue()

Returns true if there are more characters.

value

char& value()

Returns the current character.

increment

void increment()

Advances to the next character.

print

void print(OutputStream& stream)

Prints the remaining values in list form, e.g. [1, 2, 3].

toList

List<char> toList()

Collects the remaining characters into a list.