![[LISPWORKS]](/image.pl?url=http%3a%2f%2fwww.lispworks.com%2fdocumentation%2fHyperSpec%2fBody%2f..%2fGraphics%2fLWSmall.gif&f=jpg&w=240)
![[Common Lisp HyperSpec (TM)]](/image.pl?url=http%3a%2f%2fwww.lispworks.com%2fdocumentation%2fHyperSpec%2fBody%2f..%2fGraphics%2fCLHS_Sm.gif&f=jpg&w=240)
Syntax:
upper-case-pcharacter =>generalized-boolean
lower-case-pcharacter =>generalized-boolean
both-case-pcharacter =>generalized-boolean
Arguments and Values:
character---acharacter.
generalized-boolean---ageneralized boolean.
Description:
These functions test the case of a givencharacter.
upper-case-p returnstrue ifcharacter is anuppercasecharacter; otherwise, returnsfalse.
lower-case-p returnstrue ifcharacter is alowercasecharacter; otherwise, returnsfalse.
both-case-p returnstrue ifcharacter is acharacter withcase; otherwise, returnsfalse.
Examples:
(upper-case-p #\A) =>true (upper-case-p #\a) =>false (both-case-p #\a) =>true (both-case-p #\5) =>false (lower-case-p #\5) =>false (upper-case-p #\5) =>false ;; This next example presupposes an implementation ;; in which #\Bell is an implementation-defined character. (lower-case-p #\Bell) =>false
Side Effects: None.
Affected By: None.
Exceptional Situations:
Should signal an error oftypetype-error ifcharacter is not acharacter.
See Also:
char-upcase,char-downcase,Section 13.1.4.3 (Characters With Case),Section 13.1.10 (Documentation of Implementation-Defined Scripts)
Notes: None.