Groovy - toLowerCase()


Advertisements

Converts all of the characters in this String to lower case.

Syntax

String toLowerCase()

Parameters

None

Return Value

The modified string in lower case.

Following is an example of the usage of this method −

class Example { 
   static void main(String[] args) { 
      String a = "HelloWorld"; 
      println(a.toLowerCase()); 
   } 
}

When we run the above program, we will get the following result −

helloworld
groovy_strings.htm
Advertisements