toCapitalized method

String toCapitalized()

Converts the string to first character upper case. hello world -> Hello world

Implementation

String toCapitalized() =>
    isNotEmpty ? '${this[0].toUpperCase()}${substring(1)}' : '';