capitalized property
String
capitalized
The capitalized version of this
, with the first letter upper-cased and
all others lower-cased.
Implementation
String get capitalized {
if (length < 2) return toUpperCase();
return this[0].toUpperCase() + substring(1).toLowerCase();
}