string.toTitleCase

This function returns a string after capitalizing the first letter of every word.

Syntax

string.toTitleCase(str)

Arguments

Argument

Type

Description

str

string

Source string

Returns

Type

Description

string

String after capitalizing the first letter of every word

Examples

The function string.toTitleCase("hello world") returns Hello World.