Answers for "string to capital letter dart"


string to capital letter dart

extension CapExtension on String {
  String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
  String get allInCaps => this.toUpperCase();
  String get capitalizeFirstofEach => this.split(" ").map((str) => str.capitalize).join(" ");

final helloWorld = 'hello world'.inCaps; // 'Hello world'
final helloWorld = 'hello world'.allInCaps; // 'HELLO WORLD'
final helloWorld = 'hello world'.capitalizeFirstofEach; // 'Hello World'
Posted by: Guest on August-30-2020

Code answers related to "string to capital letter dart"

Code answers related to "Swift"

Browse Popular Code Answers by Language