With the help of the toLowerCase() method in the string will convert all the characters in a string in lowercase.
Syntax: String.toLowerCase()
Return: string
Example 1:
Dart
void main() {
String st = "GEEKSFORGEEKS";
print(st.toLowerCase());
}
|
Output:
geeksforgeeks
Example 2:
Dart
void main() {
String st = "Computer Science";
print(st.toLowerCase());
}
|
Output:
computer science