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);
|
||||
}
|
||||
|
||||
/// Scan all characters until next line break.
|
||||
dchar[] scanToNextBreak() @safe pure nothrow @nogc
|
||||
/// Scan and throw away all characters until next line break.
|
||||
void scanToNextBreak() @safe pure nothrow @nogc
|
||||
{
|
||||
uint length = 0;
|
||||
while(!"\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek(length)))
|
||||
while(!"\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek()))
|
||||
{
|
||||
++length;
|
||||
reader_.forward();
|
||||
}
|
||||
return reader_.get(length);
|
||||
}
|
||||
|
||||
/// Scan all characters until next line break.
|
||||
|
|
Loading…
Reference in a new issue