15 lines
181 B
C
15 lines
181 B
C
#include <string.h>
|
|
|
|
int strcmp(const char *s1,const char *s2) {
|
|
while (*s1 == *s2) {
|
|
if (*s1 == '\0') {
|
|
return 0;
|
|
}
|
|
|
|
s1++;
|
|
s2++;
|
|
}
|
|
|
|
return *s1 - *s2;
|
|
}
|