Next, if you use substr to look at the last character of 2 strings, the first n-1 characters have to be equal and the last characters have to differ by 1 when compared using ord, or the strings aren't a match.
That doesn't work for 'BBC49' and 'BBC50'.
Also, the process you are describing is O(N2). Feasible, but impractical for large lists.
In reply to Re^2: searching for strings
by BrowserUk
in thread searching for strings
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |