capitalize method
Capitalizes the first character.
'abc'.capitalize(); // 'Abc'
'abC'.capitalize(); // 'AbC'
''.capitalize(); // ''
Implementation
@useResult String capitalize() => isEmpty ? this : this[0].toUpperCase() + substring(1);
Capitalizes the first character.
'abc'.capitalize(); // 'Abc'
'abC'.capitalize(); // 'AbC'
''.capitalize(); // ''
@useResult String capitalize() => isEmpty ? this : this[0].toUpperCase() + substring(1);