| 128 | } |
| 129 | |
| 130 | int strcmp(const char* s1, const char* s2) |
| 131 | { |
| 132 | for (size_t i = 0; ; i++) |
| 133 | { |
| 134 | if (s1[i] != s2[i]) |
| 135 | return s1[i] < s2[i] ? -1 : 1; |
| 136 | else if (s1[i] == '\0') |
| 137 | return 0; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | int strncmp(const char* s1, const char* s2, size_t n) |
| 142 | { |
no outgoing calls
no test coverage detected