capitalize method

String capitalize()

Implementation

String capitalize() {
  final source = this;
  if (source.isEmpty) {
    return source;
  } else {
    return source[0].toUpperCase() + source.substring(1);
  }
}