In this program, we will create four string variables and compare them using casecmp?() and print the appropriate message. The casecmp?() method is used to compare two strings by ignoring the case. It returns 0 if both strings are equal otherwise it returns a non-zero value.
Ruby program to compare two strings by ignoring case
belongs to collection: Ruby Strings Programs
total answers (1)