ucfirst method

String ucfirst()

Make first character uppercase. e.g hello -> Hello

Implementation

String ucfirst() => replaceFirstMapped(RegExp(r'^[a-z]'), (match) {
      return match.group(0)!.toUpperCase();
    });