string - construct a string from the supplied characters

LIBRARY

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

SYNOPSIS

(string char ...)

DESCRIPTION

Returns a newly allocated string composed of the arguments.

IMPLEMENTATION NOTES

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

RETURN VALUES

Returns a single value; a string.

EXAMPLES

(string #\Q #\u #\u #\x)  =>  "Quux"

APPLICATION USAGE

This procedure is mostly used when building quite small strings. It's one way to convert a character to a string.

COMPATIBILITY

This procedure works the same since R4RS, notwithstanding the limits on strings that an implementation may have.

ERRORS

This procedure can raise exceptions with the following condition types:
&assertion (R6RS)
An argument was not a character.
Unsupported characters (R7RS)
It is an error to pass this procedure a character which the implementation does not support. 7-bit ASCII (except #\null) must be supported. Any other character is optional and potentially an error. You can use the full-unicode feature identifier in cond-expand(7scm) to check if all of Unicode 6.0 is supported.
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

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

STANDARDS

R4RS, IEEE Scheme, R5RS, R6RS, R7RS

HISTORY

First appeared in R4RS.

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.