toTitleCase method

String toTitleCase()

Capitalizes each word in the string. Example: "hello world""Hello World"

Implementation

String toTitleCase() => split(' ').map((e) => e.capitalizeFirst()).join(' ');