Answers for "dart to upper case"

4

dart touppercase

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

dart char is uppercase

import 'dart:io';

main() {
  print("Enter a string : ");
  var str = stdin.readLineSync();

  if (str[0].toUpperCase() == str[0]) {
    print("The first character is uppercase");
  } else {
    print("The first character is not uppercase");
  }
}
Posted by: Guest on January-04-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language