| string(3scm) | Scheme Programmer's Manual | string(3scm) |
NAME
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.
- 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.
- 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 (as described above). You can use the full-unicode feature identifier in cond-expand(3scm) to check if all of Unicode 6.0 is supported.
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://weinholt.se/scheme/manpages/.
| 2022-04-13 |