Palindrome detection: Difference between revisions

(Add Plain English)
(→‎{{header|Plain English}}: add some comments)
Line 3,235:
 
=={{header|Plain English}}==
Strings and substrings all come with two byte pointers by default:
* <code>first</code>, which points to the first byte in the string.
* <code>last</code>, which points to the last byte in the string.
 
 
<code>first</code> is an address, while <code>first's target</code> is the byte at that address.
No need to actually reverse the string; just compare the first's target with the last's target until they meet in the middle.
<lang plainenglish>To decide if a string is palindromic:
Slap a substring on the string.
1,808

edits