I want to know what\'s the best way to make the String.include? methods ignore case. Currently I\'m doing the following. Any suggestions? Thanks!
String.include?
You can use casecmp to do your comparison, ignoring case.
"abcdef".casecmp("abcde") #=> 1 "aBcDeF".casecmp("abcdef") #=> 0 "abcdef".casecmp("abcdefg") #=> -1 "abcdef".casecmp("ABCDEF") #=> 0