Reader.prefix

char[] prefix(const size_t length) @safe pure

Get specified number of characters starting at current position.

Note

This gets only a "view" into the internal buffer, which will be

invalidated after other Reader calls.

Parameters

lengthNumber of characters (code points, not bytes) to get. May reach past the end of the buffer; in that case the returned slice will be shorter.

Returns

Characters starting at current position or an empty slice if out of bounds.