This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: don't use strcpy()
[perl5.git] / util.h
diff --git a/util.h b/util.h
index 3a74bd0..8f4171b 100644 (file)
--- a/util.h
+++ b/util.h
@@ -231,6 +231,11 @@ means arg not present, 1 is empty string/null byte */
 
 #define instr(haystack, needle) strstr(haystack, needle)
 
+#ifdef HAS_MEMMEM
+#   define ninstr(big, bigend, little, lend)                                \
+            ((char *) memmem(big, bigend - big, little, lend - little))
+#endif
+
 /*
  * ex: set ts=8 sts=4 sw=4 et:
  */