Reader.peek

dchar peek(const size_t index) @safe pure

Get character at specified index relative to current position.

Parameters

indexIndex of the character to get relative to current position in the buffer. Can point outside of the buffer; In that case, '\0' will be returned.

Returns

Character at specified position or '\0' if outside of the buffer.
dchar peek() @safe pure

Optimized version of peek() for the case where peek index is 0.