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