Skip to content

capitalize

Capitalizes the first character of a string.

capitalize(x:string) -> string

The capitalize function returns the input string with the first character converted to uppercase and the rest to lowercase.

from {x: "hello world".capitalize()}
{x: "Hello world"}

to_upper, to_lower, to_title