capitalizeFirst property

String get capitalizeFirst

Uppercase first letter inside string and let the others lowercase Example: your name => Your name

Implementation

String get capitalizeFirst {
  if (trim().isEmpty) return this;
  return this[0].toUpperCase() + substring(1).toLowerCase();
}