string-append - append strings

LIBRARY

(import (rnrs))                     ;R6RS
(import (rnrs base))                ;R6RS
(import (scheme r5rs))              ;R7RS
(import (scheme base))              ;R7RS

SYNOPSIS

(string-append string ...)

DESCRIPTION

Returns a newly allocated string whose characters form the concatenation of the given strings.

IMPLEMENTATION NOTES

Some implementations have a single empty string object; see make-string(3scm).

RETURN VALUES

Returns a single value; a string.

EXAMPLES

(string-append "Hello," " " "world!")  =>  "Hello, world!"
(string-append)                        =>  ""

APPLICATION USAGE

Applications should not use this in a loop to accumulate output. Use open-string-output-port(3scm) instead.

COMPATIBILITY

This procedure works the same in all RnRS revisions. The only difference between implementations is whether the empty string is newly allocated or not (see above).

ERRORS

This procedure can raise exceptions with the following condition types:
&assertion (R6RS)
An argument was outside its domain.
R7RS
The assertions described above are errors. Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically.

SEE ALSO

append(3scm), open-string-output-port(3scm)

STANDARDS

R4RS, IEEE Scheme, R5RS, R6RS, R7RS

HISTORY

This procedure first appeared in R2RS.

AUTHORS

This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://github.com/schemedoc/manpages/.


Markup created by unroff 1.0sc,    March 04, 2023.