User Tools


Differences

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

Link to this comparison view

cl:functions:name-char [2019/11/11 05:00]
cl:functions:name-char [2019/11/14 16:00] (current)
Line 1: Line 1:
 +====== Function NAME-CHAR ======
 +
 +====Syntax====
 +  * **name-char** //name// → //char-p//
 +
 +====Arguments and Values====
 +  * //name// - a //​[[CL:​Glossary:​string designator]]//​.
 +  * //char-p// - a //​[[CL:​Glossary:​character]]//​ or **[[CL:​Constant Variables:​nil]]**.
 +
 +====Description====
 +Returns the //​[[CL:​Glossary:​character]]//​ //​[[CL:​Glossary:​object]]//​ whose //​[[CL:​Glossary:​name]]//​ is //name// (as determined by **[[CL:​Functions:​string-equal]]** - i.e. lookup is not case sensitive). If such a //​[[CL:​Glossary:​character]]//​ does not exist, **[[CL:​Constant Variables:​nil]]** is returned.
 +
 +====Examples====
 +<​blockquote>​
 +(name-char '​space) <​r>#​\Space</​r>​
 +(name-char "​space"​) <​r>#​\Space</​r>​
 +(name-char "​Space"​) <​r>#​\Space</​r>​
 +([[CL:​Special Operators:​let]] ((x ([[CL:​Functions:​char-name]] #\a)))
 +  ([[CL:​Macros:​or]] ([[CL:​Functions:​not]] x) ([[CL:​Functions:​eql]] (name-char x) #\a))) <​r>//​[[CL:​Glossary:​true]]//​ </r>
 +</​blockquote>​
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +Should signal an error of type type-error if //name// is not a //​[[CL:​Glossary:​string designator]]//​.
 +
 +====See Also====
 +**[[CL:​Functions:​char-name|Function CHAR-NAME]]**
 +
 +====Notes====
 +None.
 +