Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def palindrome?(str)
- regex = /\W/
- @str_reverse = str.reverse
- if @str_reverse =~ str
- @output << "\n Yes , It is a palindrome !: #{@output_stream}"
- else
- @output << "\nCan't parse output: #{@output_stream}"
- end
- end
Add Comment
Please, Sign In to add comment