toTitleCase method
Capitalizes each word in the string.
Example: "hello world" → "Hello World"
Implementation
String toTitleCase() => split(' ').map((e) => e.capitalizeFirst()).join(' ');
Capitalizes each word in the string.
Example: "hello world" → "Hello World"
String toTitleCase() => split(' ').map((e) => e.capitalizeFirst()).join(' ');