2016-05-19 14:15:22 +02:00
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
size_t strcspn(const char* string, const char* strCharSet)
|
2006-09-07 16:14:53 +02:00
|
|
|
{
|
|
|
|
const char* temp;
|
|
|
|
int i;
|
|
|
|
i=0;
|
2016-05-19 14:15:22 +02:00
|
|
|
while(*string)
|
2006-09-07 16:14:53 +02:00
|
|
|
{
|
|
|
|
temp=strCharSet;
|
|
|
|
while (*temp!='\0')
|
|
|
|
{
|
|
|
|
if (*string==*temp)
|
|
|
|
return i;
|
|
|
|
temp++;
|
|
|
|
}
|
|
|
|
i++;string++;
|
|
|
|
}
|
2016-05-19 14:15:22 +02:00
|
|
|
return i;
|
2006-09-07 16:14:53 +02:00
|
|
|
}
|