RosettaCodeData/Task/Palindrome-detection/Rascal/palindrome-detection-2.rascal

7 lines
131 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
import String;
public bool palindrome(str text){
text = replaceAll(toLowerCase(text), " ", "");
return text == reverse(text);
}