Next: , Previous: , Up: strings   [Index]

25.4 Constructors

Function: string-concatenate string-list

Append the elements of string-list together into a single string. Guaranteed to return a freshly allocated string.

Function: %string-concatenate-reverse string-list final-string nchars
Macro: string-concatenate-reverse string-list
Macro: string-concatenate-reverse string-list final-string
Macro: string-concatenate-reverse string-list final-string nchars

Reverse string-list then concatenate the elements, which must be strings. The first nchars code points in final-string are consed onto the beginning of string-list before performing the reversal and concatenation operations.

final-string defaults to the empty string and nchars defaults to the length of final-string.

This procedure is useful in the construction of procedures that accumulate character data into lists of string buffers, and wish to convert the accumulated data into a single string when done.

Function: string-tabulate integer->char len

Construct a string of size len by applying integer->char to each index in the range [0, len) to produce the corresponding string element. The order in which integer->char is applied to the indices is not specified.