Skip to content

titleCase

String.titleCase(target)

Converts target string to Title Case format.

Example

ts
import { String } from "@monstermann/string";

String.titleCase("hello world"); // "Hello World"
String.titleCase("hello-world"); // "Hello World"
ts
import { String } from "@monstermann/string";

pipe("hello world", String.titleCase()); // "Hello World"
pipe("hello-world", String.titleCase()); // "Hello World"