casecmp

str.casecmp(other_str) รข -1, 0, +1 or nil
Instance Public methods

Case-insensitive version of String#<=>.

"abcdef".casecmp("abcde")     #=> 1
"aBcDeF".casecmp("abcdef")    #=> 0
"abcdef".casecmp("abcdefg")   #=> -1
"abcdef".casecmp("ABCDEF")    #=> 0
doc_ruby_on_rails
2015-05-15 14:24:48
Comments
Leave a Comment

Please login to continue.