Next Previous Up Top Contents Index

5.11 The STREAMS module

read-to-end

Function

Summary

Returns a sequence containing all the elements up to, and including, the last element of the stream.

Signature

read-to-end input-stream => sequence 

Arguments

input-stream
An instance of <stream>.

Values

sequence
An instance of <sequence>.

Library

io

Module

streams

Description

Returns a sequence of all the elements up to, and including, the last element of input-stream, starting from the stream's current position.

The type of the result sequence is as described for read. There is no special end-of-stream behavior; if the stream is already at its end, an empty collection is returned.

Example

read-to-end(make(<string-stream>, 
                 contents: "hello there, world",
                 start: 6, 
                 end: 11));

See also

read, page 44


System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index