UTF-8 prefix()/get()

This commit is contained in:
Ferdinand Majerech 2014-07-29 02:59:16 +02:00
parent 709ab00e44
commit 2e156a8ece

View file

@ -200,6 +200,10 @@ final class Reader
{
return slice(0, length);
}
char[] prefix8(const size_t length) @safe pure nothrow @nogc
{
return slice8(length);
}
/// Get a slice view of the internal buffer.
///
@ -265,6 +269,12 @@ final class Reader
forward(length);
return result;
}
char[] get8(const size_t length) @safe pure nothrow @nogc
{
auto result = prefix8(length);
forward(length);
return result;
}
/// Move current position forward.
///