BufferedInput.next

Iterator support.

class BufferedInput
final
bool
next
(
scope size_t delegate
(
const(void)[]
)
scan
)

Parameters

scan size_t delegate
(
const(void)[]
)

The delegate to invoke with the current content.

Return Value

Type: bool

Returns true if a token was isolated, false otherwise.

Remarks: Upon success, the delegate should return the byte-based index of the consumed pattern (tail end of it). Failure to match a pattern should be indicated by returning an Eof

Each pattern is expected to be stripped of the delimiter. An end-of-file condition causes trailing content to be placed into the token. Requests made beyond Eof result in empty matches (length is zero).

Note that additional iterator and/or reader instances will operate in lockstep when bound to a common buffer.

Meta