Default scanToNextBreak now only skips, doesn't scan anything.
This commit is contained in:
parent
ccdbc21e8f
commit
8b086caa40
|
@ -857,15 +857,13 @@ final class Scanner
|
||||||
return reader_.get(length);
|
return reader_.get(length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Scan all characters until next line break.
|
/// Scan and throw away all characters until next line break.
|
||||||
dchar[] scanToNextBreak() @safe pure nothrow @nogc
|
void scanToNextBreak() @safe pure nothrow @nogc
|
||||||
{
|
{
|
||||||
uint length = 0;
|
while(!"\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek()))
|
||||||
while(!"\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek(length)))
|
|
||||||
{
|
{
|
||||||
++length;
|
reader_.forward();
|
||||||
}
|
}
|
||||||
return reader_.get(length);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Scan all characters until next line break.
|
/// Scan all characters until next line break.
|
||||||
|
|
Loading…
Reference in a new issue