properCase: Case conversion ala a proper noun

Description Usage Arguments Value See Also Examples

Description

Converts a character string with arbitrary case to a character string whose first character is capitalized and remaining characters are set to lower case.

Usage

1
properCase(x, pre="", post="", sep="")

Arguments

x

a character string or vector of character strings.

post

a character string to append to each character string in x after conversion. Default: "".

pre

a character string to prepend to each character string in x after conversion. Default: "".

sep

a character string that is pasted between the other portions of the combined string ala pre-sep-formatted x-sep-post. Default: "".

Value

a vector of character strings containing the result. The length of this vector is equal to length(x).

See Also

ordinal.

Examples

1
2
3
## produces "myBasketBall" "mySoccerBall" 
## "myFootBall" 
properCase(c("baSkeT","SoCcEr","foot"),post="Ball",pre="my")

ifultools documentation built on May 2, 2019, 4:48 p.m.