随着字符串结果与toLowerCase()方法将所有字符转换成小写的字符串的帮助。
Syntax: String.toLowerCase()
Return: string
示例 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