read-to

Reads in a group of elements from a stream up to but not including a marker element.

Reads in as many elements from the stream starting from the the stream’s current position until it reaches elemnt.  Returns the matching sequence and #t if elemnt was in the stream.  If read-to does not find elemnt (using the function supplied to test:), it will handle end-of-stream conditions as read-element.

Exported from

Modifiers

open

Arguments

streamAn instance of <stream>.
elemntAn instance of <object>.  The element to read up to.
on-end-of-stream:An instance of <object>.  Value returned if reading past the stream.  Defaults to $not-supplied.
test:An instance of <function>.  Comparator for elemnt and the stream’s contents.  The default is ==.

Values

sequence-or-eofAn instance of <sequence> or the on-end-of-stream: value.
found?An instance of <boolean>.
Reads in a group of elements from a stream up to but not including a marker element.
Reads the next element from the stream and advances the stream’s position.
The streams module.
The superclass of all stream classes.
The class of all Dylan objects.
A constant.
The class of objects that can be applied to arguments.
Compares two objects for identity.
The class of collections whose keys are consecutive integers starting from zero.
The class of boolean values.