summaryrefslogtreecommitdiffstats
path: root/usr/klibc/strstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/strstr.c')
-rw-r--r--usr/klibc/strstr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/klibc/strstr.c b/usr/klibc/strstr.c
new file mode 100644
index 0000000..8850858
--- /dev/null
+++ b/usr/klibc/strstr.c
@@ -0,0 +1,11 @@
+/*
+ * strstr.c
+ */
+
+#include <string.h>
+
+char *strstr(const char *haystack, const char *needle)
+{
+ return (char *)memmem(haystack, strlen(haystack), needle,
+ strlen(needle));
+}