capitalizeFirstLetter method

String capitalizeFirstLetter()

Capitalizes the first letter of the string.

Examples: "release" -> "Release"

Implementation

String capitalizeFirstLetter() {
  if (isEmpty) {
    return "";
  }
  if (length == 1) {
    return toUpperCase();
  }
  return '${this[0].toUpperCase()}${substring(1)}';
}