casefold
Convert Case of Character Strings

### Description

Translate letters in a vector of character strings to all lower case or all upper case.

### Usage

    casefold(x, upper = FALSE)
    tolower(x)
    toupper(x)

### Arguments

x | a vector of values to be converted. This is coerced to mode character.
upper | a logical flag. If TRUE, all characters are converted to upper case. If FALSE (the default), all characters are converted to lower case.

### Details

Characters in x that are not letters are not changed. Attributes of x are lost in the output unless x is of mode character.
Value
a character vector with all letters translated to either lower case (if upper=FALSE) or upper case (if upper=TRUE).
See Also
charmatch
Examples

    casefold(LETTERS)
    tolower(LETTERS)  # same as previous line
    casefold(letters, upper=T)
    toupper(letters)  # same as previous line

Package base version 6.1.5-18
Package Index