summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/strpbrk.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/strpbrk.c')
-rw-r--r--apps/plugins/lua/strpbrk.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/plugins/lua/strpbrk.c b/apps/plugins/lua/strpbrk.c
new file mode 100644
index 0000000..f416f39
--- /dev/null
+++ b/apps/plugins/lua/strpbrk.c
@@ -0,0 +1,10 @@
+#include "rocklibc.h"
+
+char *strpbrk(const char *s, const char *accept) {
+ register int i,l=strlen(accept);
+ for (; *s; s++)
+ for (i=0; i<l; i++)
+ if (*s == accept[i])
+ return (char*)s;
+ return 0;
+}