read-until-loop ( stream delim -- ch )


Vocabulary
io.streams.c

Definition
USING: io kernel make sequences ;

IN: io.streams.c

: read-until-loop ( stream delim -- ch )
over stream-read1 dup
[ dup pick member-eq? [ 2nip ] [ , read-until-loop ] if ]
[ 2nip ] if ; inline recursive