Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

char-equal

char-equal

type: function (subr) 
location: built-in
source file: xlstr.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(char-equal <char1> <charN> ... )
        <char1>         -       a character expression
        <charN>         -       character expression(s) to compare

DESCRIPTION

The CHAR-EQUAL function takes one or more character arguments. It checks to see if all the character arguments are equivalent. T is returned if the arguments are of the same ASCII value. In the case of two arguments, this has the effect of testing if <char1> is equal to <char2>. This test is case insensitive - the character #\a is considered to be the same ASCII value as #\A.

EXAMPLES

(char-equal #\a #\b)                    ; returns NIL
(char-equal #\b #\a)                    ; returns NIL
(char-equal #\a #\b #\c)                ; returns NIL
(char-equal #\a #\a)                    ; returns T 
(char-equal #\a #\a #\a)                ; returns T 
(char-equal #\a #\a #\b)                ; returns NIL
(char-equal #\A #\a)                    ; returns T
(char-equal #\a #\A)                    ; returns T

NOTE: The CHAR-EQUAL function is listed in the documentation that comes with XLISP as CHAR-EQUALP.


Go to the first, previous, next, last section, table of contents.