summaryrefslogtreecommitdiffstats
path: root/newlib/libc/string/str-two-way.h
Commit message (Collapse)AuthorAgeFilesLines
* * lib/str-two-way.h (two_way_long_needle): Avoid bug with longCorinna Vinschen2010-10-061-2/+2
| | | | | periodic needle having false positive. Affects memmem, strstr, strcasestr.
* 2008-10-02 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2008-10-021-1/+1
| | | | | * libc/string/str-two-way.h (critical_factorization): Cast the index operation to ensure unsigned rollover occurs when adding to SIZE_MAX.
* Make strstr and strcasestr O(n), not O(n^2); add memmem.Eric Blake2008-01-121-0/+415
* libc/string/str-two-way.h: New file. * libc/string/memmem.c (memmem): New file. * libc/include/string.h (memmem): Declare for all platforms. * libc/string/strstr.c (strstr): Provide O(n) implementation when not optimizing for space. * libc/string/strcasestr.c (strcasestr): Likewise. * libc/string/Makefile.am (ELIX_SOURCES): Rename to... (ELIX_2_SOURCES): ...this. (ELIX_4_SOURCES): New category, for memmem. (lib_a_SOURCES, libstring_la_SOURCES): Build new file. (CHEWOUT_FILES): Build documentation for memmem. * libc/string/strings.tex: Include new docs.