case | R Documentation |
str_to_upper()
converts to upper case.
str_to_lower()
converts to lower case.
str_to_title()
converts to title case, where only the first letter of
each word is capitalized.
str_to_sentence()
convert to sentence case, where only the first letter
of sentence is capitalized.
str_to_upper(string, locale = "en")
str_to_lower(string, locale = "en")
str_to_title(string, locale = "en")
str_to_sentence(string, locale = "en")
string |
Input vector. Either a character vector, or something coercible to one. |
locale |
Locale to use for comparisons. See
|
A character vector the same length as string
.
dog <- "The quick brown dog"
str_to_upper(dog)
str_to_lower(dog)
str_to_title(dog)
str_to_sentence("the quick brown dog")
# Locale matters!
str_to_upper("i") # English
str_to_upper("i", "tr") # Turkish
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.