📜  Dart – 将字符串的所有字符转换为小写

📅  最后修改于: 2021-09-02 05:40:37             🧑  作者: Mango

随着字符串结果与toLowerCase()方法将所有字符转换成小写的字符串的帮助。

示例 1:

Dart
// main function start
void main() { 
    
   // intialise a string
   String st = "GEEKSFORGEEKS"; 
     
   // print the string in lowercase
   print(st.toLowerCase()); 
      
}


Dart
// main function start
void main() { 
    
   // intialise a string
   String st = "Computer Science"; 
     
   // print the string in lowercase
   print(st.toLowerCase()); 
      
}


输出:

geeksforgeeks

示例 2:

Dart

// main function start
void main() { 
    
   // intialise a string
   String st = "Computer Science"; 
     
   // print the string in lowercase
   print(st.toLowerCase()); 
      
}

输出:

computer science