capitalize method

String capitalize()

It capitalizes the first letter on a string

Implementation

String capitalize() {
  return "${this[0].toUpperCase()}${this.substring(1)}";
}