Function: char-uppercase-p

char-uppercase-p is a byte-compiled function defined in simple.el.gz.

Signature

(char-uppercase-p CHAR)

Documentation

Return non-nil if CHAR is an upper-case character.

A character is considered upper-case if there's a corresponding lower-case character. If the Unicode tables are not yet available, e.g. during bootstrap, this function gives correct return values only for ASCII characters.

Other relevant functions are documented in the string group.

View in manual

Probably introduced at or before Emacs version 29.1.

Shortdoc

;; string
(char-uppercase-p ?A)
    => t
  (char-uppercase-p ?a)
    => nil

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun char-uppercase-p (char)
  "Return non-nil if CHAR is an upper-case character.
A character is considered upper-case if there's a corresponding
lower-case character.
If the Unicode tables are not yet available, e.g. during bootstrap,
this function gives correct return values only for ASCII characters."
  (cond ((unicode-property-table-internal 'lowercase)
         (characterp (get-char-code-property char 'lowercase)))
        ((<= ?A char ?Z))))