source:
trunk/sys/dietlibc/strcspn.c
@
1
| Last change on this file since 1 was 1, checked in by , 9 years ago | |
|---|---|
| File size: 227 bytes | |
| Rev | Line | |
|---|---|---|
| [1] | 1 | #include <string.h> |
| 2 | ||
| 3 | size_t strcspn(const char *s, const char *reject) | |
| 4 | { | |
| 5 | size_t l=0; | |
| 6 | int i,al=strlen(reject); | |
| 7 | ||
| 8 | for (; *s; ++s) { | |
| 9 | for (i=0; reject[i]; ++i) | |
| 10 | if (*s==reject[i]) return l; | |
| 11 | ++l; | |
| 12 | } | |
| 13 | return l; | |
| 14 | } |
Note: See TracBrowser
for help on using the repository browser.
