@node Characters, Lists, Sequences and Arrays and Hash Tables, Top
@chapter Characters

@defun NAME-CHAR (name)
Package:LISP

Given an argument acceptable to string,
Returns a character object whose name is NAME if one exists.  Returns NIL
otherwise.  NAME must be an object that can be coerced to a string.


@end defun

@defun CHAR-NAME (char)
Package:LISP

Returns the name for CHAR as a string; NIL if CHAR has no name.
Only #\Backspace, #\Tab, #\Newline (or #\Linefeed), #\Page, #\Return,
and #\Rubout have names.


@end defun

@defun BOTH-CASE-P (char)
Package:LISP

Returns T if CHAR is an alphabetic character; NIL otherwise.  Equivalent to
ALPHA-CHAR-P.


@end defun

@defun SCHAR (simple-string index)
Package:LISP

Returns the character object representing the INDEX-th character in STRING.
This is faster than CHAR.


@end defun

@defvr {Constant} CHAR-SUPER-BIT 
Package:LISP
The bit that indicates a super character.


@end defvr

@defvr {Constant} CHAR-FONT-LIMIT 
Package:LISP
The upper exclusive bound on values produced by CHAR-FONT.


@end defvr

@defun CHAR-DOWNCASE (char)
Package:LISP

Returns the lower-case equivalent of CHAR, if any.
If not, simply returns CHAR.


@end defun

@defun STRING-CHAR-P (char)
Package:LISP

Returns T if CHAR can be stored in a string.  In GCL, this function always
returns T since any character in GCL can be stored in a string.


@end defun

@defun CHAR-NOT-LESSP (char &rest more-chars)
Package:LISP

Returns T if the codes of CHARs are in strictly non-increasing order; NIL
otherwise.  For a lower-case character, the code of its upper-case equivalent
is used.


@end defun

@defun DISASSEMBLE (thing)
Package:LISP

Compiles the form specified by THING and prints the intermediate C language
code for that form.  But does NOT install the result of compilation.
If THING is a symbol that names a not-yet-compiled function, the function
definition is disassembled.
If THING is a lambda expression, it is disassembled as a function definition.
Otherwise, THING itself is disassembled as a top-level form.


@end defun


@defun LOWER-CASE-P (char)
Package:LISP

Returns T if CHAR is a lower-case character; NIL otherwise.


@end defun

@defun CHAR<= (char &rest more-chars)
Package:LISP

Returns T if the codes of CHARs are in strictly non-decreasing order; NIL
otherwise.


@end defun

@defvr {Constant} CHAR-HYPER-BIT 
Package:LISP
The bit that indicates a hyper character.


@end defvr

@defun CODE-CHAR (code &optional (bits 0) (font 0))
Package:LISP

Returns a character object with the specified code, if any.
If not, returns NIL.


@end defun

@defun CHAR-CODE (char)
Package:LISP

Returns the code attribute of CHAR.


@end defun

@defvr {Constant} CHAR-CONTROL-BIT 
Package:LISP
The bit that indicates a control character.


@end defvr

@defun CHAR-LESSP (char &rest more-chars)
Package:LISP

Returns T if the codes of CHARs are in strictly increasing order; NIL
otherwise.  For a lower-case character, the code of its upper-case equivalent
is used.


@end defun

@defun CHAR-FONT (char)
Package:LISP

Returns the font attribute of CHAR.


@end defun

@defun CHAR<  (char &rest more-chars)
Package:LISP

Returns T if the codes of CHARs are in strictly increasing order; NIL otherwise.


@end defun

@defun CHAR>= (char &rest more-chars)
Package:LISP

Returns T if the codes of CHARs are in strictly non-increasing order; NIL
otherwise.


@end defun

@defvr {Constant} CHAR-META-BIT 
Package:LISP
The bit that indicates a meta character.


@end defvr

@defun GRAPHIC-CHAR-P (char)
Package:LISP

Returns T if CHAR is a printing character, i.e., #\Space through #\~;
NIL otherwise.


@end defun

@defun CHAR-NOT-EQUAL (char &rest more-chars)
Package:LISP

Returns T if no two of CHARs are the same character; NIL otherwise.
Upper case character and its lower case equivalent are regarded the same.


@end defun

@defvr {Constant} CHAR-BITS-LIMIT 
Package:LISP
The upper exclusive bound on values produced by CHAR-BITS.


@end defvr

@defun CHARACTERP (x)
Package:LISP

Returns T if X is a character; NIL otherwise.


@end defun

@defun CHAR= (char &rest more-chars)
Package:LISP

Returns T if all CHARs are the same character; NIL otherwise.


@end defun

@defun ALPHA-CHAR-P (char)
Package:LISP

Returns T if CHAR is an alphabetic character, A-Z or a-z; NIL otherwise.


@end defun

@defun UPPER-CASE-P (char)
Package:LISP

Returns T if CHAR is an upper-case character; NIL otherwise.


@end defun

@defun CHAR-BIT (char name)
Package:LISP

Returns T if the named bit is on in the character CHAR; NIL otherwise.
In GCL, this function always returns NIL.


@end defun

@defun MAKE-CHAR (char &optional (bits 0) (font 0))
Package:LISP

Returns a character object with the same code attribute as CHAR and with
the specified BITS and FONT attributes.


@end defun

@defun CHARACTER (x)
Package:LISP

Coerces X into a character object if possible.


@end defun

@defun CHAR-EQUAL (char &rest more-chars)
Package:LISP

Returns T if all of its arguments are the same character; NIL otherwise.
Upper case character and its lower case equivalent are regarded the same.


@end defun

@defun CHAR-NOT-GREATERP (char &rest more-chars)
Package:LISP

Returns T if the codes of CHARs are in strictly non-decreasing order; NIL
otherwise.  For a lower-case character, the code of its upper-case equivalent
is used.


@end defun

@defun CHAR> (char &rest more-chars)
Package:LISP

Returns T if the codes of CHARs are in strictly decreasing order; NIL
otherwise.


@end defun

@defun STANDARD-CHAR-P (char)
Package:LISP

Returns T if CHAR is a standard character, i.e., one of the 95 ASCII printing
characters #\Space to #\~ and #Newline; NIL otherwise.


@end defun

@defun CHAR-UPCASE (char)
Package:LISP

Returns the upper-case equivalent of CHAR, if any.
If not, simply returns CHAR.


@end defun

@defun DIGIT-CHAR-P (char &optional (radix 10))
Package:LISP

If CHAR represents a digit in RADIX, then returns the weight as an integer.
Otherwise, returns nil.


@end defun

@defun CHAR/= (char &rest more-chars)
Package:LISP

Returns T if no two of CHARs are the same character; NIL otherwise.


@end defun

@defun CHAR-GREATERP (char &rest more-chars)
Package:LISP

Returns T if the codes of CHARs are in strictly decreasing order; NIL
otherwise.  For a lower-case character, the code of its upper-case equivalent
is used.


@end defun

@defun ALPHANUMERICP (char)
Package:LISP

Returns T if CHAR is either numeric or alphabetic; NIL otherwise.


@end defun

@defun CHAR-BITS (char)
Package:LISP

Returns the bits attribute (which is always 0 in GCL) of CHAR.


@end defun

@defun DIGIT-CHAR (digit &optional (radix 10) (font 0))
Package:LISP

Returns a character object that represents the DIGIT in the specified RADIX.
Returns NIL if no such character exists.


@end defun

@defun SET-CHAR-BIT (char name newvalue)
Package:LISP

Returns a character just like CHAR except that the named bit is set or
cleared, according to whether NEWVALUE is non-NIL or NIL.  This function
is useless in GCL.


@end defun
