Next: string-upcase, Previous: char, Up: Strings Dictionary
string
x ⇒ string
x—a string, a symbol, or a character.
string—a string.
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.
(string "already a string") ⇒ "already a string" (string 'elm) ⇒ "ELM" (string #\c) ⇒ "c"
In the case where a conversion is defined neither by this specification nor by the implementation, an error of type type-error is signaled.
coerce , string (type).
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.