Fast string search

bearophile bearophileHUGS at lycos.com
Wed Dec 15 23:02:47 PST 2010


Leonid Volnitsky:

> 36 - is correct.   When not found volnitsky() return pointer to next byte after
> last byte of s1  (same as std::search()).

Look better at the code, the main contains three writeln(). The first 36 it prints is the length of the s1 string, that's obviously correct. The other two writeln show a wrong result (it may be just a C++==>D translation error of mine).

Bye,
bearophile


More information about the Digitalmars-d mailing list