当前位置: 首页 > 文档资料 > Dart 中文教程 >

toUpperCase()

优质
小牛编辑
120浏览
2023-12-01

通过将给定字符串中的所有字符转换为大写字母来返回新字符串。

语法 (Syntax)

String.toLowerCase()

返回值 (Return Type)

返回一个字符串。

例子 (Example)

void main() { 
   String uStr = "ABC"; 
   String lStr = "hello"; 
   print(uStr.toLowerCase()); 
   print(lStr.toLowerCase()); 
} 

它将产生以下output - 。

abc 
hello