(Enhanced Palindrome Tester) Enhance Exercise palindromeTester function to allow strings containing uppercase and lowercase letters and punctuation. Before testing if the original string is a palindrome, function palindromeTester should convert the string to lowercase letters and eliminate any punctuation. For simplicity, assume the only punctuations characters can be
. , !; : ( )
You can use the copy_if algorithm and a back_inserter to make a copy of the original string, eliminate the punctuation characters and place the characters into a new string object.
Exercise
(Palindrome Tester) A palindrome is a string that is spelled the same way forward and backward. Examples of palindromes include “radar” and “able was i ere i saw elba.” Write a function palindromeTester that uses the reverse algorithm on an a copy of a string, then compares the original string and the reversed string to determine whether the original string is a palindrome. Like the Standard Library containers, string objects provide functions like begin and end to obtain iterators that point to characters in a string. Assume that the original string contains all lowercase letters and does not contain any punctuation. Use function palindromeTester in a program.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.