Text & Writing
Palindrome test
A string is a palindrome when reversing it produces exactly the same string, which is true for racecar and for a sentence once its spaces and capitals are removed.
The Formula
s is a palindrome if reverse(s) = s
A string is a palindrome when reversing it produces exactly the same string, which is true for racecar and for a sentence once its spaces and capitals are removed.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| s | Text | string | The candidate string. |
What Each Symbol Means
sstring
Text
The candidate string.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to reverse text page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Reverse Text, filed under Everyday Life. Every number the guide produces comes from substituting into this one line.