I am attempting to check to see if a string is a palindrome.
Example:
radar = radar = TRUE
iwant = tnawi = FALSE
Any examples would be appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sounds like you want to check if a word is a palindrome. There are two ways to do this. You can check the word for equality against itself reversed, or you can check the characters against the position they are supposed to match up against.
Dart’s String doesn’t have a reverse() method yet, so the second approach is probably the easiest for now: