1 /* public domain rewrite of strstr(3) */
4 strstr(const char *haystack
, const char *needle
)
9 if (*needle
== 0) return (char *)haystack
;
10 hend
= haystack
+ strlen(haystack
) - strlen(needle
) + 1;
11 while (haystack
< hend
) {
12 if (*haystack
== *needle
) {
16 if (*b
== 0) return (char *)haystack
;