Lines

Iterate across a set of text patterns.

Each pattern is exposed to the client as a slice of the original content, where the slice is transient. If you need to retain the exposed content, then you should .dup it appropriately.

The content exposed via an iterator is supposed to be entirely read-only. All current iterators abide by this rule, but it is possible a user could mutate the content through a get() slice. To enforce the desired read-only aspect, the code would have to introduce redundant copying or the compiler would have to support read-only arrays.

See Delimiters, Patterns, Quotes.

Constructors

this
this(InputStream stream)

Construct an uninitialized iterator. For example:

Members

Functions

readln
bool readln(const(T)[] content)

Read a line of text, and return false when there's no further content available.

scan
size_t scan(const(void)[] data)

Scanner implementation for this iterator. Find a '\n', and eat any immediately preceeding '\r'.

Meta