capfirst function

String capfirst(
  1. String s
)

Capitalize the first letter of the string.

Implementation

String capfirst(String s) => s.isEmpty ? s : s[0].toUpperCase() + s.substring(1);