>>>>> "George" == George Russell <[EMAIL PROTECTED]> writes:
> You need random access into the strings, or else how am I going to search
> for all occurrences of "wombat" in columns 50-59, or how indeed is the
> Boyer-Moore algorithm going to be implemented?
I dunno 'bout that. I'd have thought searching forwards and back was
the main thing. Clearly there are a lot of data structures one can
use.
However, I thought I'd mention a really interesting data structure
(from the POV of fp) used in a display editor at Xerox parc (park?)
which is mentioned in some paper by Butler Lampson. IIRC, it kept the
(non-blank) text in a table of "snippets" keyed by start position, and
did undo (and do!) by altering the arrangement of snippets. (It seems
to me that it might be an advantage to implement an editor in a pure
functional language, because you have access to non-destroyed prior
states.)
--
Peter