This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: strstr, strcasestr speedup; add memmem
According to Jeff Johnston on 1/11/2008 3:11 PM:
Here is an implementation that I recently wrote
which uses the Two-Way algorithm [1] to guarantee O(m+n) operations
while still only needing constant space
OK to commit?
Yes, thanks.
Thanks for the review. After further testing on cygwin (I originally had
a bug in strcasestr if the match appeared at the beginning of the haystack
but with different case), I committed the corrected patch.
--
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net