Processing Strings as Character Arrays – Part II

Now that we have the helper function convertToCanonical() done, we are now ready to write the function testForPalindrome. It should take 1 argument: testStr, which it will analyze to determine whether it is a valid palindrome. This function should return a boolean value: true if testStr is an palindrome, else false.

testForPalindrome()'s job should be very easy because we have convertToCanonical(). After calling convertToCanonical(), you just have to manually check the converted string for "palindrome-ness", by comparing the first char against the last char, second against the next-to-last, etc.

After the test is complete, return true if the text was a palindrome, false otherwise.