Next: , Previous: String Predicates, Up: Strings


21.4.3 String Constructors

The string constructor procedures create new string objects, possibly initializing them with some specified character data.

— Scheme Procedure: string [chrs ...]
— Scheme Procedure: list->string [chrs ...]
— C Function: scm_string (chrs) |0 |0 |1

Return a newly allocated string composed of the arguments, chrs.

— Scheme Procedure: make-string k [chr]
— C Function: scm_make_string (k, chr) |1 |1 |0

Return a newly allocated string of length k. If chr is given, then all elements of the string are initialized to chr, otherwise the contents of the STRING are unspecified.