forked from KolibriOS/kolibrios
libc testsuite + fixes
git-svn-id: svn://kolibrios.org@6433 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
int strspn(const char* string,const char* strCharSet)
|
||||
#include <string.h>
|
||||
|
||||
size_t strspn(const char* string,const char* strCharSet)
|
||||
{
|
||||
int i;
|
||||
const char* temp;
|
||||
@@ -6,14 +8,15 @@ int strspn(const char* string,const char* strCharSet)
|
||||
while (*string!='\0')
|
||||
{
|
||||
temp=strCharSet;
|
||||
while (temp!='\0')
|
||||
while (*temp!='\0')
|
||||
{
|
||||
if (*temp==*string)
|
||||
break;
|
||||
}
|
||||
if (temp=='\0')
|
||||
temp++;
|
||||
}
|
||||
if (*temp=='\0')
|
||||
break;
|
||||
*string++;
|
||||
string++;
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
|
Reference in New Issue
Block a user