Next: , Previous: Line/Delimited, Up: Input and Output


5.12.7 Block reading and writing

The Block-string-I/O module can be accessed with:

     (use-modules (ice-9 rw))

It currently contains procedures that help to implement the (scsh rw) module in guile-scsh.

— Scheme Procedure: read-string!/partial str [port_or_fdes [start [end]]]
— C Function: scm_read_string_x_partial (str, port_or_fdes, start, end)

Read characters from a port or file descriptor into a string str. A port must have an underlying file descriptor — a so-called fport. This procedure is scsh-compatible and can efficiently read large strings. It will:

— Scheme Procedure: write-string/partial str [port_or_fdes [start [end]]]
— C Function: scm_write_string_partial (str, port_or_fdes, start, end)

Write characters from a string str to a port or file descriptor. A port must have an underlying file descriptor — a so-called fport. This procedure is scsh-compatible and can efficiently write large strings. It will: