dyaml.reader
Types 2
aliasisBreak = among!('\n', '\u0085', '\u2028', '\u2029')
structReader
Provides an API to read characters from a UTF-8 buffer.
Fields
char[] buffer_size_t bufferOffset_size_t charIndex_size_t characterCount_string name_uint line_uint column_Encoding encoding_size_t upcomingASCII_size_t lastDecodedBufferOffset_size_t lastDecodedCharOffset_Methods
dchar peek(const size_t index) @safe pureGet character at specified index relative to current position.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.char[] get(const size_t length) @safe pureGet specified number of characters, moving buffer position beyond them.Constructors
this(ubyte[] buffer, string name = "<unknown>")Construct a Reader.Functions 7
fn
bool isPrintableValidUTF8(const char[] chars) @safe pureDetermine if all characters (code points, not bytes) in a string are printable.fn
size_t countASCII(const(char)[] buffer) @safe pure nothrow @nogcCounts the number of ASCII characters in buffer until the first UTF-8 sequence.fn
void testEndian(R)()fn
void testPeekPrefixForward(R)()fn
void testUTF(R)()fn
void test1Byte(R)()