Answers for "convert to uppercase dart"

5

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
4

dart touppercase

void main() { 
   String uStr = "ABC"; 
   String lStr = "hello"; 
   
   print(uStr.toUpperCase()); 
   print(lStr.toUpperCase()); 
}
Posted by: Guest on November-13-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language