I'm am currently making a Palindrome program that checks to see if the entered string is a palindrome and if it is not checks if it is a almost-palindrome. An almost-palindrome is defined(by the book) is a palindrome once you remove all punctuation characters and such. I am having trouble doing this using a normal string and/or StringBuffer. This is what I am trying:
Any suggestions would be appreciated.
if((sb.charAt(c)<'a' || sb.charAt(c)>'z')&&(sb.charAt(c)<'A' || sb.charAt(c)>'Z'));