Skip to content

Convert a string to titlecase

Source code

Description

Transform to titlecase variant.

Usage

<Expr>$str$to_titlecase()

Details

This method is only available with the "nightly" feature. See polars_info() for more details.

Value

Expr of String titlecase chars

Examples

library("polars")


pl$lit(c("hello there", "HI, THERE", NA))$str$to_titlecase()$to_series()
#> polars Series: shape: (3,)
#> Series: '' [str]
#> [
#>  "Hello There"
#>  "Hi, There"
#>  null
#> ]