toCapitalize method

String toCapitalize()

Implementation

String toCapitalize() {
  return isNotEmpty
      ? "${this[0].toUpperCase()}${substring(1, length).toLowerCase()}"
      : this;
}