toTitleCase method
Implementation
String toTitleCase() => replaceAll(RegExp(" +"), " ")
.split(" ")
.map((str) => str.toCapitalized())
.join(" ");
String toTitleCase() => replaceAll(RegExp(" +"), " ")
.split(" ")
.map((str) => str.toCapitalized())
.join(" ");