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