Scala String toLowerCase() method with example
Last Updated :
29 Oct, 2019
The toLowerCase() method is utilized to convert all the characters in the String into the lowercase.
Method Definition: String toLowerCase()
Return Type: It returns the resultant string after converting each character of the string into the lowercase.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = "NIDHI" .toLowerCase()
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = "gEEKs" .toLowerCase()
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...