toTitleCase method
Implementation
String toTitleCase() {
return replaceAll(RegExp(' +'), ' ')
.split(' ')
.map((str) => str.isEmpty ? str : '${str[0].toUpperCase()}${str.substring(1).toLowerCase()}')
.join(' ');
}
String toTitleCase() {
return replaceAll(RegExp(' +'), ' ')
.split(' ')
.map((str) => str.isEmpty ? str : '${str[0].toUpperCase()}${str.substring(1).toLowerCase()}')
.join(' ');
}