toCapitalize method

String toCapitalize()

Returns this string with the first character uppercased.

Implementation

String toCapitalize() {
  return "${this[0].toUpperCase()}${substring(1)}";
}