XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

char-equal


Type:   -   function (subr)
Source:   -   xlstr.c

Syntax

(char-equal char1 charN ... )
char1 - a character expression
charN - character expression(s) to compare
returns -  T  if all characters are equal, NIL otherwise
Note: case is not significant with this function

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 original XLISP documentation as 'char-equalp'.

See the char-equal function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next