core :: Text :: read_until
self
as raw text until nend
and append it to the out
buffer.
# Read `self` as raw text until `nend` and append it to the `out` buffer.
private fun read_until(out: FlatBuffer, start: Int, nend: Char...): Int do
var pos = start
while pos < length do
var c = self[pos]
var end_reached = false
for n in nend do
if c == n then
end_reached = true
break
end
end
if end_reached then break
out.add c
pos += 1
end
return pos
end
src/doc/commands/commands_parser.nit:474,2--491,4