titleCase property

String titleCase

returns a string that has title casing

Implementation

String get titleCase {
  if (this.isEmpty) {
    return '';
  }
  return replaceAll(RegExp(' +'), ' ').split(' ').map((str) => str.capitalize).join(' ');
}