The Standard ML Basis Library

The TEXT_STREAM_IO signature


signature TEXT_STREAM_IO


include STREAM_IO
  where type vector = CharVector.vector
  where type elem = Char.char
val inputLine : instream -> (string * instream)
val outputSubstr : (outstream * substring) -> unit


inputLine strm
Read one line from strm and return it. If strm is not at end of file, the result ends with a newline character. If it is the last line of the file and the file ends without a trailing newline, stick the newline on anyway. If at end of file, return the empty string. Raises Size if the length of the line exceeds the length of the longest string.

outputSubstr (strm, ss)
outputs the substring ss to the text stream strm. This is equivalent to:
          output (strm, Substring.string ss)

See Also


[ INDEX | TOP | Parent | Root ]

Last Modified April 15, 1996
Comments to John Reppy.
Copyright © 1997 Bell Labs, Lucent Technologies