dyaml.reader

alias isBreak
struct Reader

Types 2

aliasisBreak = among!('\n', '\u0085', '\u2028', '\u2029')
structReader

Provides an API to read characters from a UTF-8 buffer.

Methods
dchar peek(const size_t index) @safe pureGet character at specified index relative to current position.
dchar peek() @safe pureOptimized version of peek() for the case where peek index is 0.
char peekByte(const size_t index) @safe pure nothrow @nogcGet byte at specified index relative to current position.
char peekByte() @safe pure nothrow @nogcOptimized version of peekByte() for the case where peek byte index is 0.
char[] prefix(const size_t length) @safe pureGet specified number of characters starting at current position.
char[] prefixBytes(const size_t length) @safe pure nothrow @nogcGet specified number of bytes, not code points, starting at current position.
char[] slice(const size_t end) @safe pureGet a slice view of the internal buffer, starting at the current position.
dchar get() @safe pureGet the next character, moving buffer position beyond it.
char[] get(const size_t length) @safe pureGet specified number of characters, moving buffer position beyond them.
void forward(size_t length) @safe pureMove current position forward.
void forward() @safe pureMove current position forward by one character.
Mark mark() const pure nothrow @nogc @safeGet filename, line and column of current position.
Mark mark(size_t advance) const pure @safeGet filename, line and column of current position + some number of chars
inout(string) name() ref inout @safe return pure nothrow @nogcGet file name.
uint line() const @safe pure nothrow @nogcGet current line number.
uint column() const @safe pure nothrow @nogcGet current column number.
size_t charIndex() const @safe pure nothrow @nogcGet index of the current character in the buffer.
Encoding encoding() const @safe pure nothrow @nogcGet encoding of the input buffer.
Constructors
this(ubyte[] buffer, string name = "<unknown>")Construct a Reader.