capitalize property

String get capitalize

Returns the capitalized version of this string.

Example: 'hello'.capitalize -> 'Hello'.

Implementation

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