User Tools

A PCRE internal error occured. This might be caused by a faulty plugin


This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:string [2019/09/14 05:00]
cl:functions:string [2020/07/12 17:00] (current)
Line 1: Line 1:
 +====== Function STRING ======
 +  * **string** //x// → //string//
 +====Arguments and Values====
 +  * //x// - a //​[[CL:​Glossary:​string]]//,​ a //​[[CL:​Glossary:​symbol]]//,​ or a //​[[CL:​Glossary:​character]]//​.
 +  * //string// - a //​[[CL:​Glossary:​string]]//​.
 +Returns a //​[[CL:​Glossary:​string]]//​ described by //x//; specifically:​
 +  * If //x// is a //​[[CL:​Glossary:​string]]//,​ it is returned. ​
 +  * If //x// is a //​[[CL:​Glossary:​symbol]]//,​ its //​[[CL:​Glossary:​name]]//​ is returned. ​
 +  * If //x// is a //​[[CL:​Glossary:​character]]//,​ then a //​[[CL:​Glossary:​string]]//​ containing that one //​[[CL:​Glossary:​character]]//​ is returned.
 +  * **string** might perform additional, //​[[CL:​Glossary:​implementation-defined]]//​ conversions.
 +<​blockquote> ​
 +(string "​already a string"​) <​r>"​already a string"​ </r>
 +(string 'elm) <​r>"​ELM"​ </r>
 +(string #\\c) <​r>"​c"​ </r>
 +====Affected By====
 +====Exceptional Situations====
 +In the case where a conversion is defined neither by this specification nor by the //​[[CL:​Glossary:​implementation]]//,​ an error of type **[[CL:​Types:​type-error]]** is signaled.
 +====See Also====
 +  * **[[CL:​Functions:​coerce|Function COERCE]]**
 +  * **[[CL:​Types:​string|Type STRING]]**
 +**[[CL:​Functions:​coerce]]** can be used to convert a //​[[CL:​Glossary:​sequence]]//​ of //​[[CL:​Glossary:​characters]]//​ to a //​[[CL:​Glossary:​string]]//​.
 +**[[CL:​Functions:​prin1-to-string]]**,​ **[[CL:​Functions:​princ-to-string]]**,​ **[[CL:​Functions:​write-to-string]]**,​ or **[[CL:​Functions:​format]]** (with a first argument of **[[CL:​Constant Variables:​nil]]**) can be used to get a //​[[CL:​Glossary:​string]]//​ representation of a //​[[CL:​Glossary:​number]]//​ or any other //​[[CL:​Glossary:​object]]//​.