Following program shows you how to compare two strings are equal by ignoring the case.
In this program we get two different cases of strings from user and shows those strings are equal by using
puts "Please enter string1:" string1 = gets.to_s puts "Please enter string2:" string2 = gets.to_s if string1.casecmp(string2)== 0 puts "Given strings are equal" else puts "Given strings are not equal" end
Please enter string1: HELLO Please enter string2: hello Given strings are equal
Please enter string1: hello Please enter string2: world Given strings are not equal
On By Navya
Getting 'No EntityManager with actual transaction available for current thread' exception while removing some data
How to fix Found use of deprecated [org.hibernate.id.SequenceGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead