toTitleCase method

String toTitleCase()

Implementation

String toTitleCase() => isNotNullOrEmpty
    ? "${this?.replaceAll(RegExp(' +'), ' ').split(' ').map((str) => str.toCapitalized()).join(' ')}"
    : "";