#Convert case of a string.
rm(list= ls())
library(stringr)
dog <- "The quick brown dog"
str_to_upper(dog)
## [1] "THE QUICK BROWN DOG"
str_to_lower(dog)
## [1] "the quick brown dog"
str_to_title(dog)
## [1] "The Quick Brown Dog"
str_to_sentence("the quick brown dog")
## [1] "The quick brown dog"
# Locale matters!
str_to_upper("i") # English
## [1] "I"
str_to_upper("i", "tr") # Turkish
## [1] "<U+0130>"