Ruby has some very straightforward methods to change the case of your strings.
Here are some of them:
"HoMer".downcase    # returns homer
"lisa".upcase      # returns LISA
"margie".capitalize       # returns Margie
"BaRt".swapcase        #returns bArT
Just a quick one! :)
Find this article also on definenull.com.
 


No comments:
Post a Comment