toTitleCase method
Converts the string to Title Case.
Implementation
String toTitleCase() {
if (isEmpty) return this;
return split(' ').map((word) => word.capitalize()).join(' ');
}
Converts the string to Title Case.
String toTitleCase() {
if (isEmpty) return this;
return split(' ').map((word) => word.capitalize()).join(' ');
}