Idea for string comparison aid
David Feuer
dfeuer@techhouse.brown.edu
Thu Aug 4 22:47:00 GMT 2005
The first message I sent with this subject did nothing but display my
ignorance. I hope this one will be more productive. What I would like
to have is an incremental version of strxfrm. This function would take
a string, a state object of some sort, and a number n, and return the
next n characters of the transformed string. Forward passes should be
cheap, requiring little state. Backward passes will be cheap in many
(most?) encodings, but will occasionally be expensive. I suspect
(correct me please if I'm wrong) that in most applications, backward
passes will be reached only occasionally, so their larger space or time
demands are acceptable.
I would try to write this function myself, but I cannot seem to find
documentation for the internal workings of strxfrm, and have not yet
managed to interpret the source, though I have made some progress.
David
More information about the Libc-alpha
mailing list