toSentenceCase method

String toSentenceCase()

Implementation

String toSentenceCase() {
  switch (length) {
    case 0:
      return this;
    case 1:
      return toUpperCase();
    default:
      return substring(0, 1).toUpperCase() + substring(1);
  }
}