Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   




casefold( ) FUNCTION


casefold( ) Function


The casefold( ) Function is used to convert all the characters / letters of the String in lower case.


Example :


x = "HeLLo"
y = x.casefold()
print("The String in lower case is ",y)


Output :



  The String in lower case is hello

In the above code, we have declared a String 'HeLLo', in which the letters 'H' and two 'L's are in upper case.


x = "HeLLo"

java_Collections

So, we have used the 'casefold( )' Function to convert them to lower case and assign to a variable 'y'.


y = x.casefold( )

java_Collections