Function: capitalize

capitalize is a function defined in casefiddle.c.

Signature

(capitalize OBJ)

Documentation

Convert argument to capitalized form and return that.

This means that each word's first character is converted to either title case or upper case, and the rest to lower case.

The argument may be a character or string. The result has the same type. (See downcase for further details about the type.)

The argument object is not altered--the value is a copy. If argument is a character, characters which map to multiple code points when cased, e.g. fi, are returned unchanged.

Other relevant functions are documented in the string group.

View in manual

Probably introduced at or before Emacs version 26.1.

Shortdoc

;; string
(capitalize "foo bar zot")
    => "Foo Bar Zot"

Source Code

// Defined in /usr/src/emacs/src/casefiddle.c
{
  return casify_object (CASE_CAPITALIZE, obj);
}