Nyquist / XLISP 2.0  -  Contents | Tutorials | Examples | Reference

char-not-greaterp


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

Syntax

(char-not-greaterp char1 charN ... )
char1 - a character expression
charN - character expression[s] to compare
returns -  T  if the characters are of monotonically non-decreasing ASCII value, NIL otherwise
Note: case is not significant with this function

Description

The 'char-not-greaterp' function tests if all character arguments are monotonically non-decreasing.  T  is returned if the arguments are of monotonically non-decreasing ASCII value, NIL otherwise. In the case of two arguments, this has the effect of testing if 'char1' is less than or equal to 'char2'. This test is case insensitive, the character '#\a' is considered to be the same ASCII value as the character '#\A'.

Examples

(char-not-greaterp #\a #\b)      => T
(char-not-greaterp #\b #\a)      => NIL
(char-not-greaterp #\a #\b #\c)  => T
(char-not-greaterp #\a #\a)      => T
(char-not-greaterp #\a #\b #\b)  => T
(char-not-greaterp #\A #\a)      => T
(char-not-greaterp #\a #\A)      => T

See also:

  Back to Top


Nyquist / XLISP 2.0  -  Contents | Tutorials | Examples | Reference