Vimcar interview question

How to create a function to check palindrome strings?