Next: , Previous: SRFI-13 Constructors, Up: SRFI-13


39.11.4 List/String Conversion

The procedure string->list is extended by SRFI-13, that is why it is included in (srfi srfi-13). The other procedures are new. The Guile core already contains the procedure list->string for converting a list of characters into a string (see List/String Conversion).

— Scheme Procedure: string->list str [start [end]]

Convert the string str into a list of characters.

— Scheme Procedure: reverse-list->string chrs

Return a new string made from the list of characters chrs, in reverse order.

          (reverse-list->string '(#\a #\B #\c))
          ⇒ "cBa"
— Scheme Procedure: string-join ls [delimiter [grammar]]

Append the string in the string list ls, using the string delimiter (defaults to a string of one space) between the elements of ls. grammar is a symbol which specifies how delimiter is placed between the strings, and defaults to the symbol infix.

infix
Insert delimiter between list elements. An empty list will produce an empty string.
strict-infix
Like infix, but will raise an error if given the empty list.
suffix
Insert delimiter after every list element.
prefix
Insert delimiter before each list element.