Original Post
I was wondering if anyone knows a fast way of finding
the longest repeated string in a buffer.
"1234123412341234"
has "1234" repeated 4 times, and so "12341234" is the
longest string in the buffer
"12341234abcd12341234"
still has "12341234" as the longest string.
i suspect that there is something faster than looking
at every single letter, and seeing if the longest string
exists between it and every other letter.
this takes N^2 time.... far too slow if there is
a big buffer.