Rev 647 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 647 | Rev 6433 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | #include |
|
- | 2 | ||
1 | int strspn(const char* string,const char* strCharSet) |
3 | size_t strspn(const char* string,const char* strCharSet) |
2 | { |
4 | { |
3 | int i; |
5 | int i; |
4 | const char* temp; |
6 | const char* temp; |
5 | i=0; |
7 | i=0; |
6 | while (*string!='\0') |
8 | while (*string!='\0') |
7 | { |
9 | { |
8 | temp=strCharSet; |
10 | temp=strCharSet; |
9 | while (temp!='\0') |
11 | while (*temp!='\0') |
10 | { |
12 | { |
11 | if (*temp==*string) |
13 | if (*temp==*string) |
12 | break; |
14 | break; |
- | 15 | temp++; |
|
13 | } |
16 | } |
14 | if (temp=='\0') |
17 | if (*temp=='\0') |
15 | break; |
18 | break; |
16 | *string++; |
19 | string++; |
17 | i++; |
20 | i++; |
18 | } |
21 | } |
19 | return i; |
22 | return i; |
20 | } |
23 | } |