Handbook
Glossary
stream-read-ignoring-crlf ( n stream -- seq/f )
Vocabulary
io
.
crlf
Inputs
n
an
object
stream
an
object
Outputs
seq/f
an
object
Definition
USING:
byte-vectors
io
io.private
kernel
math
sbufs
sequences
;
IN:
io.crlf
::
stream-read-ignoring-crlf
( n stream -- seq/f )
n stream
stream-read
dup
[
dup
[
"\r\n"
member?
]
any?
[
stream
stream-element-type
+byte+
=
[
n
<byte-vector>
]
[
n
<sbuf>
]
if
:>
accum accum
push-all-ignoring-crlf
[
accum
length
n
<
and
]
[
n accum
length
-
stream
stream-read
[
accum
push-all-ignoring-crlf
]
keep
]
do
while
accum stream
stream-exemplar
like
]
when
]
when
;