Convert Case of Character Strings

DESCRIPTION:

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

USAGE:

casefold(cv, upper=F)
tolower(x)
toupper(x)

REQUIRED ARGUMENTS:

cv or x
a vector or bdVector of values to be converted. This will be coerced to mode character (through as.character).

OPTIONAL ARGUMENTS:

upper
a logical flag.
if TRUE, all characters are converted to upper case.
if FALSE, all characters are converted to lower case.

VALUE:

a character vector or bdCharacter with all letters translated to either lower case (if upper=F) or upper case (if upper=T).

DETAILS:

Characters in cv that are not letters are not changed. Attributes of cv are lost in the output.

The toupper and tolower functions are frontend functions to casefold with the appropriate value for upper set.

SEE ALSO:

EXAMPLES:

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