Vodafone Interview Question

They asked me a coding question. How to check if a string is a palindrome.