toNormalCase property

String get toNormalCase

Implementation

String get toNormalCase =>
    (this?.replaceAllMapped(
              RegExp('([a-z])([A-Z])'),
              (Match match) => '${match.group(1)} ${match.group(2)}',
            ) ??
            '')
        .replaceFirstMapped(
          RegExp('^[a-z]'),
          (Match match) => match.group(0)!.toUpperCase(),
        );