strs_title
converts each element of a character vector to title case, based
on the specified locale. It is similar to Python's str.title()
method.
Usage
strs_title(string, locale = "en")
Arguments
- string
A character vector to be converted to title case.
- locale
A character string representing the locale to be used for the
conversion.
Value
A character vector of the same length as string
, with each element
converted to title case.
Examples
strs_title("hello world")
#> [1] "Hello World"
strs_title("guten tag", locale = "de")
#> [1] "Guten Tag"