withFirstLetterAsLowerCase method

String withFirstLetterAsLowerCase()

Converts the first letter of the string to lowercase.

Implementation

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