capitalize property

String get capitalize

Capitalizes the first letter of the string.

Example:

'hello'.capitalize; // 'Hello'

Implementation

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