rockbox/apps/plugins/lua/strcspn.c
Marcin Bukat bfd0179042 Revert "Update lua plugin to 5.2.3"
FILE typedef to *void needs more work to not break sim and
application builds. I checked only a few random native builds
unfortunately. Sorry for inconvenience.
2014-04-02 20:46:06 +02:00

17 lines
261 B
C

#include "rocklibc.h"
#undef strcspn
size_t strcspn(const char *s, const char *reject)
{
size_t l=0;
int a=1,i,al=strlen(reject);
while((a)&&(*s))
{
for(i=0;(a)&&(i<al);i++)
if (*s==reject[i]) a=0;
if (a) l++;
s++;
}
return l;
}