withFirstLetterAsLowerCase method

String withFirstLetterAsLowerCase()

Converts the first letter of the string to lowercase.

Implementation

String withFirstLetterAsLowerCase() {
  if (isEmpty) return this;
  if (length == 1) return toLowerCase();
  return this[0].toLowerCase() + substring(1);
}