ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   13 Characters   13.2 Dictionary of Characters

13.2.21 name-char Function

name-char name    char-p

Arguments and Values:
name - a string designator.

char-p - a character or nil.

Returns the character object whose name is name (as determined by string-equal - i.e., lookup is not case sensitive). If such a character does not exist, nil is returned.

(name-char 'space)  #\Space
(name-char "space")  #\Space
(name-char "Space")  #\Space
(let ((x (char-name #\a)))
  (or (not x) (eql (name-char x) #\a)))  true

Exceptional Situations:
Should signal an error of type type-error if name is not a string designator.

See Also:

Allegro CL Implementation Details:

Home Previous Up Next Table of Contents Index
© Franz Inc. All Rights Reserved - File last updated 2022-07-25