Rev 647 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6433 | siemargl | 1 | #include |
2 | |||
3 | int strncmp(const char* string1, const char* string2, size_t count) |
||
145 | halyavin | 4 | { |
6433 | siemargl | 5 | while(count>0 && (*string1==*string2)) |
145 | halyavin | 6 | { |
6433 | siemargl | 7 | if ('\0' == *string1) return 0; |
215 | victor | 8 | ++string1; |
9 | ++string2; |
||
10 | --count; |
||
11 | } |
||
12 | if(count) return (*string1 - *string2); |
||
145 | halyavin | 13 | return 0; |
6433 | siemargl | 14 | } |