core :: String :: read_until_pos
self
from pos from
to pos to
and store result in buffer
.
# Reads `self` from pos `from` to pos `to` and store result in `buffer`.
private fun read_until_pos(from, to: Int, buffer: Buffer): Int do
if from < 0 or from >= length or
to < 0 or to >= length or
from >= to then return -1
var pos = from
while pos < to do
buffer.add self[pos]
pos += 1
end
return pos
end
lib/template/macro.nit:308,2--319,4