RosettaCodeData/Task/Palindrome-detection/Rascal/palindrome-detection-2.rascal
2023-07-01 13:44:08 -04:00

6 lines
131 B
Text

import String;
public bool palindrome(str text){
text = replaceAll(toLowerCase(text), " ", "");
return text == reverse(text);
}