Upper-case-p
Recognizer for upper case characters
(Upper-case-p x) is true if and only if x is an upper
case character, i.e., a member of the list #\A, #\B, ...,
#\Z.
The guard for upper-case-p states that its argument is a
character.
Upper-case-p is a Common Lisp function. See any Common Lisp
documentation for more information. Note that the value returned may depend
on the host Lisp; see soundness, specifically Example 1 in the Section,
“Examples of divergence among Lisp implementations”.
Function: upper-case-p
(defun upper-case-p (x)
(declare (xargs :guard (characterp x)))
(cond ((standard-char-p x)
(and (member x
'(#\A #\B #\C #\D #\E #\F #\G
#\H #\I #\J #\K #\L #\M #\N #\O #\P #\Q
#\R #\S #\T #\U #\V #\W #\X #\Y #\Z))
t))
(t (upper-case-p-non-standard x))))
Subtopics
- Up-alpha-p
- Determine if a character is an upper-case letter (A-Z).