string (original) (raw)
ANSI Common Lisp 16 Strings
16.2 Dictionary of Strings
Syntax:
string x string
Arguments and Values:
x - a string, a symbol, or a character.
string - a string.
Description:
Returns a string described by x; specifically:
- If x is a string, it is returned.
- If x is a symbol, its name is returned.
- If x is a character, then a string containing that one character is returned.
- string might perform additional, implementation-defined conversions.
Examples:
(string "already a string") "already a string"
(string 'elm)
"ELM"
(string #\c)
"c"
Exceptional Situations:
In the case where a conversion is defined neither by this specification nor by the implementation, an error of type type-error is signaled.
See Also:
Notes:
coerce can be used to convert a sequence of _characters_to a string.
prin1-to-string, princ-to-string, write-to-string, or format (with a first argument of nil) can be used to get a_string_ representation of a number or any other object.
Allegro CL Implementation Details:
None.