Initial commit of the Samsung YP-R0 port.
[maemo-rb.git] / apps / plugins / lua / strcspn.c
blob0a19eaebf25a692d92789dd12fc93872c21f4a75
1 #include "rocklibc.h"
3 #undef strcspn
4 size_t strcspn(const char *s, const char *reject)
6 size_t l=0;
7 int a=1,i,al=strlen(reject);
9 while((a)&&(*s))
11 for(i=0;(a)&&(i<al);i++)
12 if (*s==reject[i]) a=0;
13 if (a) l++;
14 s++;
16 return l;