Skip to main content
Version: v4.23

capitalize

Capitalizes the first character of a string.

capitalize(x:string) -> string

Description

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

Examples

Capitalize a lowercase string

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

See Also

to_upper, to_lower, to_title