capitalize method
Returns the string with the first character capitalized.
Implementation
String capitalize() {
if (isEmpty) return this;
return '${this[0].toUpperCase()}${substring(1)}';
}
Returns the string with the first character capitalized.
String capitalize() {
if (isEmpty) return this;
return '${this[0].toUpperCase()}${substring(1)}';
}