Name

toLowerCase()

Class

String

Description

Converts all of the characters in the string to lowercase. For example, "ABC" will convert to "abc".

Examples

  • String str1 = "CCCP"; 
    String str2 = "Rabbit"; 
    str1 = str1.toLowerCase();
    str2 = str2.toLowerCase();
    println(str1 + ":" + str2);  // Prints "cccp:rabbit"
    

Syntax

  • str.toLowerCase()

Parameters

  • strString: any variable of type String

Return

  • String