append-buffer-until ( seps buffer accum -- sep/f )


Vocabulary
io.ports.private

Inputs
sepsan object
bufferan object
accuman object


Outputs
sep/fan object


Definition


:: append-buffer-until ( seps buffer accum -- sep/f )
seps buffer buffer-find :> end end
[ buffer buffer-length ] unless*
:> count accum length :> start start count + accum lengthen
start accum underlying>> <displaced-alien>
count buffer buffer-read-unsafe swap memcpy end
[ buffer buffer-pop ] [ f ] if ; inline