summaryrefslogtreecommitdiffstats
path: root/newlib/libc/string/strstr.c
Commit message (Collapse)AuthorAgeFilesLines
* Make strstr and strcasestr O(n), not O(n^2); add memmem.Eric Blake2008-01-121-3/+51
| | | | | | | | | | | | | | | * 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.
* import newlib-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+73