UTF-8 prefix()/get()
This commit is contained in:
parent
709ab00e44
commit
2e156a8ece
|
@ -200,6 +200,10 @@ final class Reader
|
||||||
{
|
{
|
||||||
return slice(0, length);
|
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.
|
/// Get a slice view of the internal buffer.
|
||||||
///
|
///
|
||||||
|
@ -265,6 +269,12 @@ final class Reader
|
||||||
forward(length);
|
forward(length);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
char[] get8(const size_t length) @safe pure nothrow @nogc
|
||||||
|
{
|
||||||
|
auto result = prefix8(length);
|
||||||
|
forward(length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// Move current position forward.
|
/// Move current position forward.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue