Skip to contents

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

Usage

strs_lower(string, locale = "en")

Arguments

string

A character vector to be converted to lowercase.

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

Examples

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