Write a function that checks if a given string (case insensitive) is a palindrome.
A palindrome is a word, number, phrase, or other sequence of symbols that reads the same backwards as forwards, such as
madam
or racecar
.
def is_palindrome(str)
str.downcase!
str == str.reverse
end
def is_palindrome str
str.casecmp?(str.reverse)
end