capitalized property

String get capitalized

Capitalize the first letter.

'hello'.capitalized // => 'Hello'

Implementation

String get capitalized {
  if (isEmpty) return this;
  return this[0].toUpperCase() + substring(1);
}