Text UtilitiesLesson 118Free preview
Create a Palindrome
This lesson is part of Web Developer Tools · All levels
Summary
This tool converts plain text into palindromes, usually by adding an inverted copy to the back. The result is always the same in both directions, even though the meaning is often unreasonable. For the shortest result, you can look for the end that has formed the palindrome and then add the rest of the text to it. This exercise helps us understand string manipulation and pattern search.
Key points
- The simplest way is to write the text plus the reverse.
- The result is always palindromic but can be twice as long.
- The shortest palindromes can be searched by checking the prefix
- Spacing and punctuation affect the end result.
- The making of palindromes is not an encryption method.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.