LineIterator

LineIterator: LineIterator, hasValue, value, increment, print, toList, iterator

struct LineIterator: Iterator<string>, Printable

Iterates over the lines of a string.

LineIterator

LineIterator(string stream)

Initializes an iterator over the given string.

hasValue

bool hasValue()

Returns true if there are more lines.

value

string value()

Returns the current line.

increment

void increment()

Advances to the next line.

print

void print(OutputStream& stream)

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

toList

List<string> toList()

Collects the remaining lines into a list.

iterator

LineIterator iterator()

Returns itself.