source:
trunk/sys/dietlibc/strspn.c
@
204
Last change on this file since 204 was 1, checked in by , 8 years ago | |
---|---|
File size: 234 bytes |
Rev | Line | |
---|---|---|
[1] | 1 | #include <string.h> |
2 | ||
3 | size_t strspn(const char *s, const char *accept) | |
4 | { | |
5 | size_t l = 0; | |
6 | const char *a; | |
7 | ||
8 | for (; *s; s++) { | |
9 | for (a = accept; *a && *s != *a; a++); | |
10 | ||
11 | if (!*a) | |
12 | break; | |
13 | else | |
14 | l++; | |
15 | } | |
16 | ||
17 | return l; | |
18 | } |
Note: See TracBrowser
for help on using the repository browser.