upperCaseFirstLower method

String? upperCaseFirstLower()

Make the first letter of the word uppercase and the rest lowercase.

Implementation

String? upperCaseFirstLower() {
  if (this != null) {
    if (this!.length > 1) {
      return this!.substring(0, 1).toUpperCase() +
          this!.substring(1).toLowerCase();
    } else
      return this!.toUpperCase();
  } else
    return this;
}