Skip to contents

strs_upper converts each element of a character vector to uppercase, based on the specified locale. It is similar to Python's str.upper() method.

Usage

strs_upper(string, locale = "en")

Arguments

string

A character vector to be converted to uppercase.

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 uppercase.

Examples

strs_upper("hello world")
#> [1] "HELLO WORLD"
strs_upper("äpfel", locale = "de")
#> [1] "ÄPFEL"