toTitleCase method

String toTitleCase()

Implementation

String toTitleCase() => replaceAll(r'$', ' ').replaceAll(RegExp(' +'), ' ').split(" ").map((str) => str.toCapitalized()).join(" ");