Go to the first, previous, next, last section, table of contents.


Translation Functions

Function: translate-area start-pos end-pos translation-table &optional buffer
This function applies the mapping translation-table to each character in the region starting at the position start-pos up to, but not including, end-pos.

translation-table is a string, each character represents the mapping for an ASCII character of that character's position in the string. If the string is less than 256 characters in length any undefined characters will remain unchanged (i.e. a translation-table of `' would leave the region unaltered).

Function: translate-string string translation-table
This function uses a similar method to that used in the translate-area function. Instead of applying the mapping to a region of a buffer it applies it to the string string. string is returned (after being modified).

Note that the string really is modified, no copy is made!

(translate-string "abc" upcase-table)
    => "ABC"

Variable: upcase-table
This is a 256-character long string which may be used as a translation table to convert from lower-case to upper-case with the functions translate-string and translate-area.

Variable: downcase-table
Similar to upcase-table except that it is used to convert from upper-case to lower-case.

The following functions use the translation functions and the two translation tables described above.

Command: upcase-area start-pos end-pos &optional buffer
Makes all alphabetic characters in the specified region of text upper-case.

When called interactively uses the block marks for its arguments; note that this won't work properly with rectangular blocks.

Command: downcase-area start-pos end-pos &optional buffer
Similar to upcase-area but makes all alphabetic characters lower-case.

Command: upcase-word count
For the next count words starting at the cursor position, make their alphabetic characters upper-case.

Command: downcase-word count
Does the opposite of upcase-word, makes words lower-case!

Command: capitalize-word
The first character of this word (normally the one under the cursor) is made upper-case, the rest lower.


Go to the first, previous, next, last section, table of contents.