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