Function: time-stamp-do-letter-case

time-stamp-do-letter-case is a byte-compiled function defined in time-stamp.el.gz.

Signature

(time-stamp-do-letter-case CHANGE-IS-DOWNCASE UPCASE TITLE-CASE CHANGE-CASE TEXT)

Documentation

Apply upper- and lower-case conversions to TEXT per the flags.

CHANGE-IS-DOWNCASE non-nil indicates that modifier CHANGE-CASE requests lowercase, otherwise the modifier requests uppercase. UPCASE is non-nil if the "^" modifier is active. TITLE-CASE is non-nil if the "*" modifier is active. CHANGE-CASE is non-nil if the "#" modifier is active. This is an internal helper for time-stamp-string-preprocess.

Source Code

;; Defined in /usr/src/emacs/lisp/time-stamp.el.gz
(defun time-stamp-do-letter-case (change-is-downcase
                                  upcase title-case change-case text)
  "Apply upper- and lower-case conversions to TEXT per the flags.
CHANGE-IS-DOWNCASE non-nil indicates that modifier CHANGE-CASE
requests lowercase, otherwise the modifier requests uppercase.
UPCASE is non-nil if the \"^\" modifier is active.
TITLE-CASE is non-nil if the \"*\" modifier is active.
CHANGE-CASE is non-nil if the \"#\" modifier is active.
This is an internal helper for `time-stamp-string-preprocess'."
  (cond ((and upcase change-case)
         (downcase text))
        ((and title-case change-case)
         (upcase text))
        ((and change-is-downcase change-case)
         (downcase text))
        ((or change-case upcase)
         (upcase text))
        (title-case
         (capitalize text))
        (t
         text)))