toCapitalized method
Capitalizes the first letter of the string.
Implementation
String toCapitalized() {
if (isEmpty) {
return this;
}
return this[0].toUpperCase() + (length > 1 ? substring(1) : '');
}
Capitalizes the first letter of the string.
String toCapitalized() {
if (isEmpty) {
return this;
}
return this[0].toUpperCase() + (length > 1 ? substring(1) : '');
}