RosettaCodeData/Task/Palindrome-detection/E/palindrome-detection.e
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

8 lines
210 B
Text

def isPalindrome(string :String) {
def upper := string.toUpperCase()
def last := upper.size() - 1
for i => c ? (upper[last - i] != c) in upper(0, upper.size() // 2) {
return false
}
return true
}