A comparison routine for comparing two data strings includes
pre-processing, copying letters and digits into local buffers, comparing
the contents of the local buffers using a left-to-right, walk-forward
scanning algorithm, including selecting a first item from each buffer and
comparing them and, if the two first items are the same, advancing to the
next two items from each buffer, continuing with the comparison of
subsequent buffer items until all pairs of items have been compared as
long as no mismatch of items is found, and when a mismatch is
encountered, the algorithm looks ahead in the data strings, searching for
an identifiable pattern. A pair of independent search pointers are
initially set to a first character in each data buffer and adjusted if a
matching character pattern is found. A processing loop sequentially tests
for a number of character patterns. If a matching character pattern is
found, the match is scored, incrementing the score by one point for each
matching character pattern that is found. If none of the character
patterns is found, or the end of either string is reached, the processing
loop is exited and the scoring data is collected.