Remove unused strspn()

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@743 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2010-04-15 16:42:51 +00:00
parent e14d5b08e9
commit fd569ca2f8
2 changed files with 0 additions and 26 deletions

View File

@@ -37,7 +37,6 @@ extern char *strchr(const char * s, int c);
extern char *strrchr(const char * s, int c);
extern size_t strlen(const char * s);
extern size_t strnlen(const char * s, size_t count);
extern size_t strspn(const char *s, const char *accept);
extern char *strpbrk(const char * cs,const char * ct);
extern char *strsep(char **s, const char *ct);
extern void *memset(void * s,int c,size_t count);

View File

@@ -220,31 +220,6 @@ size_t strnlen(const char * s, size_t count)
return sc - s;
}
/**
* strspn - Calculate the length of the initial substring of @s which only
* contain letters in @accept
* @s: The string to be searched
* @accept: The string to search for
*/
size_t strspn(const char *s, const char *accept)
{
const char *p;
const char *a;
size_t count = 0;
for (p = s; *p != '\0'; ++p) {
for (a = accept; *a != '\0'; ++a) {
if (*p == *a)
break;
}
if (*a == '\0')
return count;
++count;
}
return count;
}
/**
* strpbrk - Find the first occurrence of a set of characters
* @cs: The string to be searched